public class RexOver extends RexCall
| Modifier and Type | Class and Description |
|---|---|
private static class |
RexOver.Finder
|
private static class |
RexOver.OverFound
Exception thrown when an OVER is found.
|
| Modifier and Type | Field and Description |
|---|---|
private boolean |
distinct |
private static RexOver.Finder |
FINDER |
private RexWindow |
window |
| Constructor and Description |
|---|
RexOver(RelDataType type,
SqlAggFunction op,
List<RexNode> operands,
RexWindow window,
boolean distinct)
Creates a RexOver.
|
| Modifier and Type | Method and Description |
|---|---|
<R,P> R |
accept(RexBiVisitor<R,P> visitor,
P arg)
Accepts a visitor with a payload, dispatching to the right overloaded
RexBiVisitor.visitInputRef(RexInputRef, Object) visitXxx} method. |
<R> R |
accept(RexVisitor<R> visitor)
Accepts a visitor, dispatching to the right overloaded
visitXxx method. |
RexCall |
clone(RelDataType type,
List<RexNode> operands)
Creates a new call to the same operator with different operands.
|
protected String |
computeDigest(boolean withType) |
static boolean |
containsOver(List<RexNode> exprs,
RexNode condition)
Returns whether an expression list contains an OVER clause.
|
static boolean |
containsOver(RexNode expr)
Returns whether an expression contains an OVER clause.
|
static boolean |
containsOver(RexProgram program)
Returns whether a program contains an OVER clause.
|
SqlAggFunction |
getAggOperator()
Returns the aggregate operator for this expression.
|
RexWindow |
getWindow() |
boolean |
isDistinct() |
getKind, getOperands, getOperator, getType, isAlwaysFalse, isAlwaysTrue, toStringprivate static final RexOver.Finder FINDER
private final RexWindow window
private final boolean distinct
RexOver(RelDataType type, SqlAggFunction op, List<RexNode> operands, RexWindow window, boolean distinct)
For example, "SUM(DISTINCT x) OVER (ROWS 3 PRECEDING)" is represented as:
SqlStdOperatorTable.SUM,
RexFieldAccess("x") }
SqlWindow(ROWS 3 PRECEDING)
type - Result typeop - Aggregate operatoroperands - Operands listwindow - Window specificationdistinct - Aggregate operator is applied on distinct elementspublic SqlAggFunction getAggOperator()
public RexWindow getWindow()
public boolean isDistinct()
protected String computeDigest(boolean withType)
computeDigest in class RexCallpublic <R> R accept(RexVisitor<R> visitor)
RexNodevisitXxx method.
Also see RexUtil.apply(RexVisitor, java.util.List, RexNode),
which applies a visitor to several expressions simultaneously.
public <R,P> R accept(RexBiVisitor<R,P> visitor, P arg)
RexNodeRexBiVisitor.visitInputRef(RexInputRef, Object) visitXxx} method.public static boolean containsOver(RexNode expr)
public static boolean containsOver(RexProgram program)
public static boolean containsOver(List<RexNode> exprs, RexNode condition)
Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.