public class RexShuttle extends Object implements RexVisitor<RexNode>
Like RexVisitor, this is an instance of the
Visitor Pattern. Use
RexShuttle if you would like your methods to return a
value.
| Constructor and Description |
|---|
RexShuttle() |
| Modifier and Type | Method and Description |
|---|---|
Iterable<RexNode> |
apply(Iterable<? extends RexNode> iterable)
Applies this shuttle to each expression in an iterable.
|
<T extends RexNode> |
apply(List<T> exprList)
Applies this shuttle to each expression in a list and returns the
resulting list.
|
RexNode |
apply(RexNode expr)
Applies this shuttle to an expression, or returns null if the expression
is null.
|
<T extends RexNode> |
mutate(List<T> exprList)
Applies this shuttle to each expression in a list.
|
protected RexNode[] |
visitArray(RexNode[] exprs,
boolean[] update)
Visits each of an array of expressions and returns an array of the
results.
|
RexNode |
visitCall(RexCall call) |
RexNode |
visitCorrelVariable(RexCorrelVariable variable) |
RexNode |
visitDynamicParam(RexDynamicParam dynamicParam) |
RexNode |
visitFieldAccess(RexFieldAccess fieldAccess) |
protected List<RexFieldCollation> |
visitFieldCollations(List<RexFieldCollation> collations,
boolean[] update)
Visits each of a list of field collations and returns a list of the
results.
|
RexNode |
visitInputRef(RexInputRef inputRef) |
protected List<RexNode> |
visitList(List<? extends RexNode> exprs,
boolean[] update)
Visits each of a list of expressions and returns a list of the
results.
|
void |
visitList(List<? extends RexNode> exprs,
List<RexNode> outExprs)
Visits a list and writes the results to another list.
|
RexNode |
visitLiteral(RexLiteral literal) |
RexNode |
visitLocalRef(RexLocalRef localRef) |
RexNode |
visitOver(RexOver over) |
RexNode |
visitRangeRef(RexRangeRef rangeRef) |
RexWindow |
visitWindow(RexWindow window) |
public RexNode visitOver(RexOver over)
visitOver in interface RexVisitor<RexNode>public RexNode visitCall(RexCall call)
visitCall in interface RexVisitor<RexNode>protected RexNode[] visitArray(RexNode[] exprs, boolean[] update)
exprs - Array of expressionsupdate - If not null, sets this to true if any of the expressions
was modifiedprotected List<RexNode> visitList(List<? extends RexNode> exprs, boolean[] update)
exprs - List of expressionsupdate - If not null, sets this to true if any of the expressions
was modifiedpublic void visitList(List<? extends RexNode> exprs, List<RexNode> outExprs)
protected List<RexFieldCollation> visitFieldCollations(List<RexFieldCollation> collations, boolean[] update)
collations - List of field collationsupdate - If not null, sets this to true if any of the expressions
was modifiedpublic RexNode visitCorrelVariable(RexCorrelVariable variable)
visitCorrelVariable in interface RexVisitor<RexNode>public RexNode visitFieldAccess(RexFieldAccess fieldAccess)
visitFieldAccess in interface RexVisitor<RexNode>public RexNode visitInputRef(RexInputRef inputRef)
visitInputRef in interface RexVisitor<RexNode>public RexNode visitLocalRef(RexLocalRef localRef)
visitLocalRef in interface RexVisitor<RexNode>public RexNode visitLiteral(RexLiteral literal)
visitLiteral in interface RexVisitor<RexNode>public RexNode visitDynamicParam(RexDynamicParam dynamicParam)
visitDynamicParam in interface RexVisitor<RexNode>public RexNode visitRangeRef(RexRangeRef rangeRef)
visitRangeRef in interface RexVisitor<RexNode>public final <T extends RexNode> boolean mutate(List<T> exprList)
public final <T extends RexNode> List<T> apply(List<T> exprList)
public final Iterable<RexNode> apply(Iterable<? extends RexNode> iterable)
Copyright © 2012–2015 The Apache Software Foundation. All rights reserved.