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
-
Method Summary
Modifier and TypeMethodDescription<R,
P> RexWindowBound accept
(RexBiVisitor<R, P> visitor, P arg) Transforms the bound viaRexBiVisitor
.<R> RexWindowBound
accept
(RexVisitor<R> visitor) Transforms the bound viaRexVisitor
.static RexWindowBound
Deprecated.@Nullable RexNode
Returns offset from XX PRECEDING/FOLLOWING.int
Returns relative sort offset when known at compile time.boolean
Returns if the bound is CURRENT ROW.boolean
Returns if the bound is FOLLOWING.boolean
Returns if the bound is PRECEDING.boolean
Returns if the bound is unbounded.final boolean
Returns whether the bound isUNBOUNDED FOLLOWING
.final boolean
Returns whether the bound isUNBOUNDED PRECEDING
.int
Returns 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:
-