Package org.apache.iceberg.expressions
Class ExpressionVisitors
java.lang.Object
org.apache.iceberg.expressions.ExpressionVisitors
Utils for traversing 
expressions.- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic class
- 
Method SummaryModifier and TypeMethodDescriptionstatic <R> Rvisit(Expression expr, ExpressionVisitors.CustomOrderExpressionVisitor<R> visitor) Traverses the givenexpressionwith avisitor.static <R> Rvisit(Expression expr, ExpressionVisitors.ExpressionVisitor<R> visitor) Traverses the givenexpressionwith avisitor.static BooleanvisitEvaluator(Expression expr, ExpressionVisitors.ExpressionVisitor<Boolean> visitor) Traverses the givenexpressionwith avisitor.
- 
Method Details- 
visitTraverses the givenexpressionwith avisitor.The visitor will be called to handle each node in the expression tree in postfix order. Result values produced by child nodes are passed when parent nodes are handled. - Type Parameters:
- R- the return type produced by the expression visitor
- Parameters:
- expr- an expression to traverse
- visitor- a visitor that will be called to handle each node in the expression tree
- Returns:
- the value returned by the visitor for the root expression node
 
- 
visitEvaluatorpublic static Boolean visitEvaluator(Expression expr, ExpressionVisitors.ExpressionVisitor<Boolean> visitor) Traverses the givenexpressionwith avisitor.The visitor will be called to handle only nodes required for determining result in the expression tree in postfix order. Result values produced by child nodes are passed when parent nodes are handled. - Parameters:
- expr- an expression to traverse
- visitor- a visitor that will be called to handle each node in the expression tree
- Returns:
- the value returned by the visitor for the root expression node
 
- 
visitpublic static <R> R visit(Expression expr, ExpressionVisitors.CustomOrderExpressionVisitor<R> visitor) Traverses the givenexpressionwith avisitor.This passes a Supplierto each non-leafvisitormethod. The supplier returns the result of traversing child expressions. Getting the result of the supplier allows traversing the expression in the desired order.- Type Parameters:
- R- the return type produced by the expression visitor
- Parameters:
- expr- an expression to traverse
- visitor- a visitor that will be called to handle each node in the expression tree
- Returns:
- the value returned by the visitor for the root expression node
 
 
-