Class RexOver

  • public class RexOver
    extends RexCall
    Call to an aggregate function over a window.
    • Field Detail

      • distinct

        private final boolean distinct
      • ignoreNulls

        private final boolean ignoreNulls
    • Constructor Detail

      • RexOver

        RexOver​(RelDataType type,
                SqlAggFunction op,
                java.util.List<RexNode> operands,
                RexWindow window,
                boolean distinct,
                boolean ignoreNulls)
        Creates a RexOver.

        For example, "SUM(DISTINCT x) OVER (ROWS 3 PRECEDING)" is represented as:

        type - Result type
        op - Aggregate operator
        operands - Operands list
        window - Window specification
        distinct - Aggregate operator is applied on distinct elements
    • Method Detail

      • getAggOperator

        public SqlAggFunction getAggOperator()
        Returns the aggregate operator for this expression.
      • isDistinct

        public boolean isDistinct()
      • ignoreNulls

        public boolean ignoreNulls()
      • computeDigest

        protected java.lang.String computeDigest​(boolean withType)
        computeDigest in class RexCall
      • containsOver

        public static boolean containsOver​(RexNode expr)
        Returns whether an expression contains an OVER clause.
      • containsOver

        public static boolean containsOver​(RexProgram program)
        Returns whether a program contains an OVER clause.
      • containsOver

        public static boolean containsOver​(java.util.List<RexNode> exprs,
                                           RexNode condition)
        Returns whether an expression list contains an OVER clause.
      • clone

        public RexCall clone​(RelDataType type,
                             java.util.List<RexNode> operands)
        Description copied from class: RexCall
        Creates a new call to the same operator with different operands.
        clone in class RexCall
        type - Return type
        operands - Operands to call
        New call