Package org.apache.calcite.tools
Class RelBuilder.AggCallImpl
- java.lang.Object
-
- org.apache.calcite.tools.RelBuilder.AggCallImpl
-
- All Implemented Interfaces:
RelBuilder.AggCall
- Enclosing class:
- RelBuilder
private class RelBuilder.AggCallImpl extends java.lang.Object implements RelBuilder.AggCall
Implementation ofRelBuilder.AggCall
.
-
-
Field Summary
Fields Modifier and Type Field Description private SqlAggFunction
aggFunction
private java.lang.String
alias
private boolean
approximate
private boolean
distinct
private RexNode
filter
private com.google.common.collect.ImmutableList<RexNode>
operands
private com.google.common.collect.ImmutableList<RexNode>
orderKeys
-
Constructor Summary
Constructors Constructor Description AggCallImpl(SqlAggFunction aggFunction, boolean distinct, boolean approximate, RexNode filter, java.lang.String alias, com.google.common.collect.ImmutableList<RexNode> operands, com.google.common.collect.ImmutableList<RexNode> orderKeys)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RelBuilder.AggCall
approximate(boolean approximate)
Returns a copy of this AggCall that may return approximate results ifapproximate
is true.RelBuilder.AggCall
as(java.lang.String alias)
Returns a copy of this AggCall with a given alias.RelBuilder.AggCall
distinct()
Returns a copy of this AggCall that is distinct.RelBuilder.AggCall
distinct(boolean distinct)
Returns a copy of this AggCall that is optionally distinct.RelBuilder.AggCall
filter(RexNode condition)
Returns a copy of this AggCall that applies a filter before aggregating values.RelBuilder.AggCall
sort(java.lang.Iterable<RexNode> orderKeys)
Returns a copy of this AggCall that sorts its input values byorderKeys
before aggregating, as in SQL'sWITHIN GROUP
clause.RelBuilder.AggCall
sort(RexNode... orderKeys)
Returns a copy of this AggCall that sorts its input values byorderKeys
before aggregating, as in SQL'sWITHIN GROUP
clause.
-
-
-
Field Detail
-
aggFunction
private final SqlAggFunction aggFunction
-
distinct
private final boolean distinct
-
approximate
private final boolean approximate
-
filter
private final RexNode filter
-
alias
private final java.lang.String alias
-
operands
private final com.google.common.collect.ImmutableList<RexNode> operands
-
orderKeys
private final com.google.common.collect.ImmutableList<RexNode> orderKeys
-
-
Constructor Detail
-
AggCallImpl
AggCallImpl(SqlAggFunction aggFunction, boolean distinct, boolean approximate, RexNode filter, java.lang.String alias, com.google.common.collect.ImmutableList<RexNode> operands, com.google.common.collect.ImmutableList<RexNode> orderKeys)
-
-
Method Detail
-
sort
public RelBuilder.AggCall sort(java.lang.Iterable<RexNode> orderKeys)
Description copied from interface:RelBuilder.AggCall
Returns a copy of this AggCall that sorts its input values byorderKeys
before aggregating, as in SQL'sWITHIN GROUP
clause.- Specified by:
sort
in interfaceRelBuilder.AggCall
-
sort
public RelBuilder.AggCall sort(RexNode... orderKeys)
Description copied from interface:RelBuilder.AggCall
Returns a copy of this AggCall that sorts its input values byorderKeys
before aggregating, as in SQL'sWITHIN GROUP
clause.- Specified by:
sort
in interfaceRelBuilder.AggCall
-
approximate
public RelBuilder.AggCall approximate(boolean approximate)
Description copied from interface:RelBuilder.AggCall
Returns a copy of this AggCall that may return approximate results ifapproximate
is true.- Specified by:
approximate
in interfaceRelBuilder.AggCall
-
filter
public RelBuilder.AggCall filter(RexNode condition)
Description copied from interface:RelBuilder.AggCall
Returns a copy of this AggCall that applies a filter before aggregating values.- Specified by:
filter
in interfaceRelBuilder.AggCall
-
as
public RelBuilder.AggCall as(java.lang.String alias)
Description copied from interface:RelBuilder.AggCall
Returns a copy of this AggCall with a given alias.- Specified by:
as
in interfaceRelBuilder.AggCall
-
distinct
public RelBuilder.AggCall distinct(boolean distinct)
Description copied from interface:RelBuilder.AggCall
Returns a copy of this AggCall that is optionally distinct.- Specified by:
distinct
in interfaceRelBuilder.AggCall
-
distinct
public RelBuilder.AggCall distinct()
Description copied from interface:RelBuilder.AggCall
Returns a copy of this AggCall that is distinct.- Specified by:
distinct
in interfaceRelBuilder.AggCall
-
-