Interface RelBuilder.AggCall

Enclosing class:
RelBuilder

public static interface RelBuilder.AggCall
Information necessary to create a call to an aggregate function.
See Also:
  • Method Details

    • filter

      RelBuilder.AggCall filter(@Nullable RexNode condition)
      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 by orderKeys before aggregating, as in SQL's WITHIN GROUP clause.
    • sort

      default RelBuilder.AggCall sort(RexNode... orderKeys)
      Returns a copy of this AggCall that sorts its input values by orderKeys before aggregating, as in SQL's WITHIN GROUP clause.
    • preOperands

      RelBuilder.AggCall preOperands(Iterable<? extends RexNode> 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 is SqlInternalOperators.LITERAL_AGG; most aggregate functions do not take pre-operands.

    • preOperands

      default RelBuilder.AggCall preOperands(RexNode... preOperands)
    • unique

      RelBuilder.AggCall unique(@Nullable Iterable<RexNode> distinctKeys)
      Returns a copy of this AggCall that makes its input values unique by distinctKeys before aggregating, as in SQL's WITHIN DISTINCT clause.
    • unique

      default RelBuilder.AggCall unique(RexNode... distinctKeys)
      Returns a copy of this AggCall that makes its input values unique by distinctKeys before aggregating, as in SQL's WITHIN DISTINCT clause.
    • approximate

      RelBuilder.AggCall approximate(boolean approximate)
      Returns a copy of this AggCall that may return approximate results if approximate is true.
    • ignoreNulls

      RelBuilder.AggCall ignoreNulls(boolean ignoreNulls)
      Returns a copy of this AggCall that ignores nulls.
    • as

      RelBuilder.AggCall as(@Nullable String alias)
      Returns a copy of this AggCall with a given alias.
    • distinct

      RelBuilder.AggCall distinct(boolean distinct)
      Returns a copy of this AggCall that is optionally distinct.
    • distinct

      default RelBuilder.AggCall distinct()
      Returns a copy of this AggCall that is distinct.
    • over

      Converts this aggregate call to a windowed aggregate call.