Package org.apache.calcite.tools
Interface RelBuilder.AggCall
- Enclosing class:
RelBuilder
public static interface RelBuilder.AggCall
Information necessary to create a call to an aggregate function.
-
Method Summary
Modifier and TypeMethodDescriptionapproximate
(boolean approximate) Returns a copy of this AggCall that may return approximate results ifapproximate
is true.Returns a copy of this AggCall with a given alias.default RelBuilder.AggCall
distinct()
Returns a copy of this AggCall that is distinct.distinct
(boolean distinct) Returns a copy of this AggCall that is optionally distinct.Returns a copy of this AggCall that applies a filter before aggregating values.ignoreNulls
(boolean ignoreNulls) Returns a copy of this AggCall that ignores nulls.over()
Converts this aggregate call to a windowed aggregate call.preOperands
(Iterable<? extends RexNode> preOperands) Returns a copy of this AggCall with the given pre-operands.default RelBuilder.AggCall
preOperands
(RexNode... preOperands) Returns a copy of this AggCall that sorts its input values byorderKeys
before aggregating, as in SQL'sWITHIN GROUP
clause.default RelBuilder.AggCall
Returns a copy of this AggCall that sorts its input values byorderKeys
before aggregating, as in SQL'sWITHIN GROUP
clause.Returns a copy of this AggCall that makes its input values unique bydistinctKeys
before aggregating, as in SQL'sWITHIN DISTINCT
clause.default RelBuilder.AggCall
Returns a copy of this AggCall that makes its input values unique bydistinctKeys
before aggregating, as in SQL'sWITHIN DISTINCT
clause.
-
Method Details
-
getPosition
SqlParserPos getPosition() -
filter
Returns a copy of this AggCall that applies a filter before aggregating values. -
sort
Returns a copy of this AggCall that sorts its input values byorderKeys
before aggregating, as in SQL'sWITHIN GROUP
clause. -
sort
Returns a copy of this AggCall that sorts its input values byorderKeys
before aggregating, as in SQL'sWITHIN GROUP
clause. -
preOperands
Returns a copy of this AggCall with the given pre-operands.Pre-operands apply at the start of aggregation and are constant for the whole query. They do not reference input columns and are typically
RexLiteral
. An example isSqlInternalOperators.LITERAL_AGG
; most aggregate functions do not take pre-operands. -
preOperands
-
unique
Returns a copy of this AggCall that makes its input values unique bydistinctKeys
before aggregating, as in SQL'sWITHIN DISTINCT
clause. -
unique
Returns a copy of this AggCall that makes its input values unique bydistinctKeys
before aggregating, as in SQL'sWITHIN DISTINCT
clause. -
approximate
Returns a copy of this AggCall that may return approximate results ifapproximate
is true. -
ignoreNulls
Returns a copy of this AggCall that ignores nulls. -
as
Returns a copy of this AggCall with a given alias. -
distinct
Returns a copy of this AggCall that is optionally distinct. -
distinct
Returns a copy of this AggCall that is distinct. -
over
RelBuilder.OverCall over()Converts this aggregate call to a windowed aggregate call.
-