Class SqlAnyValueAggFunction

All Implemented Interfaces:
Context, Wrapper

public class SqlAnyValueAggFunction extends SqlAggFunction
Definition of the ANY_VALUE aggregate functions, returning any one of the values which go into it.
  • Constructor Details

    • SqlAnyValueAggFunction

      public SqlAnyValueAggFunction(SqlKind kind)
      Creates a SqlAnyValueAggFunction.
  • Method Details

    • unwrap

      public <T> @Nullable T unwrap(Class<T> clazz)
      Description copied from interface: Wrapper
      Finds an instance of an interface implemented by this object, or returns null if this object does not support that interface.
      Specified by:
      unwrap in interface Wrapper
      Overrides:
      unwrap in class SqlAggFunction
    • getDistinctOptionality

      public Optionality getDistinctOptionality()
      Description copied from class: SqlAggFunction
      Returns whether this aggregate function allows the DISTINCT keyword.

      The default implementation returns Optionality.OPTIONAL, which is appropriate for most aggregate functions, including SUM and COUNT.

      Some aggregate functions, for example MIN, produce the same result with or without DISTINCT, and therefore return Optionality.IGNORED to indicate this. For such functions, Calcite will probably remove DISTINCT while optimizing the query.

      Overrides:
      getDistinctOptionality in class SqlAggFunction
    • getRollup

      public SqlAggFunction getRollup()
      Description copied from class: SqlAggFunction
      Gets rollup aggregation function.
      Overrides:
      getRollup in class SqlAggFunction