Package org.apache.calcite.rex
Class RexWindowBound
java.lang.Object
org.apache.calcite.rex.RexWindowBound
Abstracts "XX PRECEDING/FOLLOWING" and "CURRENT ROW" bounds for windowed
aggregates.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<R,P> RexWindowBound accept(RexBiVisitor<R, P> visitor, P arg) Transforms the bound viaRexBiVisitor.<R> RexWindowBoundaccept(RexVisitor<R> visitor) Transforms the bound viaRexVisitor.static RexWindowBoundDeprecated.@Nullable RexNodeReturns offset from XX PRECEDING/FOLLOWING.intReturns relative sort offset when known at compile time.booleanReturns if the bound is CURRENT ROW.booleanReturns if the bound is FOLLOWING.booleanReturns if the bound is PRECEDING.booleanReturns if the bound is unbounded.final booleanReturns whether the bound isUNBOUNDED FOLLOWING.final booleanReturns whether the bound isUNBOUNDED PRECEDING.intReturns the number of nodes in this bound.
-
Constructor Details
-
RexWindowBound
public RexWindowBound()
-
-
Method Details
-
create
Deprecated. -
isUnbounded
@Pure @EnsuresNonNullIf(expression="getOffset()", result=false) public boolean isUnbounded()Returns if the bound is unbounded.- Returns:
- if the bound is unbounded
-
isUnboundedPreceding
public final boolean isUnboundedPreceding()Returns whether the bound isUNBOUNDED PRECEDING. -
isUnboundedFollowing
public final boolean isUnboundedFollowing()Returns whether the bound isUNBOUNDED FOLLOWING. -
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
@Pure @EnsuresNonNullIf(expression="getOffset()", result=false) public boolean isCurrentRow()Returns if the bound is CURRENT ROW.- Returns:
- if the bound is CURRENT ROW
-
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
Transforms the bound viaRexVisitor.- Type Parameters:
R- return type of the visitor- Parameters:
visitor- visitor to accept- Returns:
- transformed bound
-
accept
Transforms the bound viaRexBiVisitor.- Type Parameters:
R- return type of the visitor- Parameters:
visitor- visitor to acceptarg- Payload- Returns:
- transformed bound
-
nodeCount
public int nodeCount()Returns the number of nodes in this bound.- See Also:
-