Class RexOver


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

      • distinct

        private final boolean distinct
    • Constructor Detail

      • RexOver

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

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

        Parameters:
        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()
      • computeDigest

        @Nonnull
        protected java.lang.String computeDigest​(boolean withType)
        Overrides:
        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.
        Overrides:
        clone in class RexCall
        Parameters:
        type - Return type
        operands - Operands to call
        Returns:
        New call