java.lang.Object
org.apache.arrow.gandiva.expression.TreeBuilder
Contains helper functions for constructing expression trees.
- 
Method SummaryModifier and TypeMethodDescriptionstatic TreeNodeInvoke this function to create a node representing an and-clause.static TreeNodemakeBinaryLiteral(byte[] binaryConstant) static ConditionmakeCondition(String function, List<Field> inFields) Short cut to create an expression tree involving a single function, e.g. a+b+c.static ConditionmakeCondition(TreeNode root) Invoke this function to create a condition.static TreeNodemakeDecimalLiteral(String decimalConstant, int precision, int scale) static ExpressionTreemakeExpression(String function, List<Field> inFields, Field resultField) Short cut to create an expression tree involving a single function, e.g. a+b+c.static ExpressionTreemakeExpression(TreeNode root, Field resultField) Invoke this function to create an expression tree.static TreeNodeInvoke this function to create a node representing a field, e.g. a column name.static TreeNodemakeFunction(String function, List<TreeNode> children, ArrowType retType) Invoke this function to create a node representing a function.static TreeNodeInvoke this function to create a node representing an if-clause.static TreeNodemakeInExpressionBigInt(TreeNode resultNode, Set<Long> longValues) static TreeNodemakeInExpressionBinary(TreeNode resultNode, Set<byte[]> binaryValues) static TreeNodemakeInExpressionDecimal(TreeNode resultNode, Set<BigDecimal> decimalValues, Integer precision, Integer scale) static TreeNodemakeInExpressionDouble(TreeNode resultNode, Set<Double> doubleValues) static TreeNodemakeInExpressionFloat(TreeNode resultNode, Set<Float> floatValues) static TreeNodemakeInExpressionInt32(TreeNode resultNode, Set<Integer> intValues) static TreeNodemakeInExpressionString(TreeNode resultNode, Set<String> stringValues) static TreeNodemakeLiteral(Boolean booleanConstant) Helper functions to create literal constants.static TreeNodemakeLiteral(Double doubleConstant) static TreeNodemakeLiteral(Float floatConstant) static TreeNodemakeLiteral(Integer integerConstant) static TreeNodemakeLiteral(Long longConstant) static TreeNodecreate a null literal.static TreeNodeInvoke this function to create a node representing an or-clause.static TreeNodemakeStringLiteral(String stringConstant) 
- 
Method Details- 
makeLiteralHelper functions to create literal constants.
- 
makeLiteral
- 
makeLiteral
- 
makeLiteral
- 
makeLiteral
- 
makeStringLiteral
- 
makeBinaryLiteral
- 
makeDecimalLiteral
- 
makeNullcreate a null literal.
- 
makeFieldInvoke this function to create a node representing a field, e.g. a column name.- Parameters:
- field- represents the input argument - includes the name and type of the field
- Returns:
- Node representing a field
 
- 
makeFunctionInvoke this function to create a node representing a function.- Parameters:
- function- Name of the function, e.g. add
- children- The arguments to the function
- retType- The type of the return value of the operator
- Returns:
- Node representing a function
 
- 
makeIfpublic static TreeNode makeIf(TreeNode condition, TreeNode thenNode, TreeNode elseNode, ArrowType retType) Invoke this function to create a node representing an if-clause.- Parameters:
- condition- Node representing the condition
- thenNode- Node representing the if-block
- elseNode- Node representing the else-block
- retType- Return type of the node
- Returns:
- Node representing an if-clause
 
- 
makeAndInvoke this function to create a node representing an and-clause.- Parameters:
- nodes- Nodes in the 'and' clause.
- Returns:
- Node representing an and-clause
 
- 
makeOrInvoke this function to create a node representing an or-clause.- Parameters:
- nodes- Nodes in the 'or' clause.
- Returns:
- Node representing an or-clause
 
- 
makeExpressionInvoke this function to create an expression tree.- Parameters:
- root- is returned by a call to MakeField, MakeFunction, or MakeIf
- resultField- represents the return value of the expression
- Returns:
- ExpressionTree referring to the root of an expression tree
 
- 
makeExpressionpublic static ExpressionTree makeExpression(String function, List<Field> inFields, Field resultField) Short cut to create an expression tree involving a single function, e.g. a+b+c.- Parameters:
- function- Name of the function, e.g. add()
- inFields- In arguments to the function
- resultField- represents the return value of the expression
- Returns:
- ExpressionTree referring to the root of an expression tree
 
- 
makeConditionInvoke this function to create a condition.- Parameters:
- root- is returned by a call to MakeField, MakeFunction, MakeIf, ..
- Returns:
- condition referring to the root of an expression tree
 
- 
makeConditionShort cut to create an expression tree involving a single function, e.g. a+b+c.- Parameters:
- function- Name of the function, e.g. add()
- inFields- In arguments to the function
- Returns:
- condition referring to the root of an expression tree
 
- 
makeInExpressionInt32
- 
makeInExpressionBigInt
- 
makeInExpressionDecimal
- 
makeInExpressionFloat
- 
makeInExpressionDouble
- 
makeInExpressionString
- 
makeInExpressionBinary
 
-