Class RexWindowBound

    • Constructor Detail

      • RexWindowBound

        public RexWindowBound()
    • Method Detail

      • create

        public static RexWindowBound create​(SqlNode node,
                                            RexNode rexNode)
        Creates window bound.
        Parameters:
        node - SqlNode of the bound
        rexNode - offset value when bound is not UNBOUNDED/CURRENT ROW
        Returns:
        window bound
      • isUnbounded

        public boolean isUnbounded()
        Returns if the bound is unbounded.
        Returns:
        if the bound is unbounded
      • isPreceding

        public boolean isPreceding()
        Returns if the bound is PRECEDING.
        Returns:
        if the bound is PRECEDING
      • isFollowing

        public boolean isFollowing()
        Returns if the bound is FOLLOWING.
        Returns:
        if the bound is FOLLOWING
      • isCurrentRow

        public boolean isCurrentRow()
        Returns if the bound is CURRENT ROW.
        Returns:
        if the bound is CURRENT ROW
      • getOffset

        public RexNode getOffset()
        Returns offset from XX PRECEDING/FOLLOWING.
        Returns:
        offset from XX PRECEDING/FOLLOWING
      • getOrderKey

        public int getOrderKey()
        Returns relative sort offset when known at compile time. For instance, UNBOUNDED PRECEDING is less than CURRENT ROW.
        Returns:
        relative order or -1 when order is not known
      • accept

        public <R> RexWindowBound accept​(RexVisitor<R> visitor)
        Transforms the bound via RexVisitor.
        Type Parameters:
        R - return type of the visitor
        Parameters:
        visitor - visitor to accept
        Returns:
        transformed bound