public interface FunctionHelper
RexNode.| Modifier and Type | Interface and Description |
|---|---|
static class |
FunctionHelper.AggregateInfo
Class to store aggregate function related information.
|
static class |
FunctionHelper.FieldCollation |
| Modifier and Type | Method and Description |
|---|---|
List<org.apache.calcite.rex.RexNode> |
convertInputs(FunctionInfo functionInfo,
List<org.apache.calcite.rex.RexNode> inputs,
org.apache.calcite.rel.type.RelDataType returnType)
Given function information, the inputs to that function, and the
expected return type, it will return the list of inputs with any
necessary adjustments, e.g., casting of expressions.
|
default org.apache.calcite.rex.RexNode |
foldExpression(org.apache.calcite.rex.RexNode expr)
Folds expression according to function semantics.
|
FunctionHelper.AggregateInfo |
getAggregateFunctionInfo(boolean isDistinct,
boolean isAllColumns,
String aggregateName,
List<org.apache.calcite.rex.RexNode> aggregateParameters,
List<FunctionHelper.FieldCollation> fieldCollations)
Returns aggregation information based on given parameters.
|
org.apache.calcite.rex.RexNode |
getExpression(String functionText,
FunctionInfo functionInfo,
List<org.apache.calcite.rex.RexNode> inputs,
org.apache.calcite.rel.type.RelDataType returnType)
Given function information and text, inputs to a function, and the
expected return type, it will return an expression node containing
the function call.
|
FunctionInfo |
getFunctionInfo(String functionText)
Returns function information based on function text.
|
org.apache.calcite.rel.type.RelDataType |
getReturnType(FunctionInfo functionInfo,
List<org.apache.calcite.rex.RexNode> inputs)
Given function information and its inputs, it returns
the type of the output of the function.
|
FunctionHelper.AggregateInfo |
getWindowAggregateFunctionInfo(boolean isDistinct,
boolean isAllColumns,
String aggregateName,
List<org.apache.calcite.rex.RexNode> aggregateParameters)
Returns aggregation information for analytical function based on given parameters.
|
boolean |
isAndFunction(FunctionInfo fi)
returns true if FunctionInfo is an And function.
|
boolean |
isCompareFunction(FunctionInfo fi)
returns true if FunctionInfo is a compare function (e.g.
|
boolean |
isConsistentWithinQuery(FunctionInfo fi)
Returns whether the expression, for a single query, returns the same result given
the same arguments/children.
|
boolean |
isEqualFunction(FunctionInfo fi)
returns true if FunctionInfo is an == function.
|
boolean |
isInFunction(FunctionInfo fi)
returns true if FunctionInfo is an In function.
|
boolean |
isNSCompareFunction(FunctionInfo fi) |
boolean |
isOrFunction(FunctionInfo fi)
returns true if FunctionInfo is an Or function.
|
boolean |
isStateful(FunctionInfo fi)
returns true if FunctionInfo is a stateful function.
|
FunctionInfo getFunctionInfo(String functionText) throws SemanticException
SemanticExceptionorg.apache.calcite.rel.type.RelDataType getReturnType(FunctionInfo functionInfo, List<org.apache.calcite.rex.RexNode> inputs) throws SemanticException
SemanticExceptionList<org.apache.calcite.rex.RexNode> convertInputs(FunctionInfo functionInfo, List<org.apache.calcite.rex.RexNode> inputs, org.apache.calcite.rel.type.RelDataType returnType) throws SemanticException
SemanticExceptionorg.apache.calcite.rex.RexNode getExpression(String functionText, FunctionInfo functionInfo, List<org.apache.calcite.rex.RexNode> inputs, org.apache.calcite.rel.type.RelDataType returnType) throws SemanticException
SemanticExceptionFunctionHelper.AggregateInfo getAggregateFunctionInfo(boolean isDistinct, boolean isAllColumns, String aggregateName, List<org.apache.calcite.rex.RexNode> aggregateParameters, List<FunctionHelper.FieldCollation> fieldCollations) throws SemanticException
SemanticExceptionFunctionHelper.AggregateInfo getWindowAggregateFunctionInfo(boolean isDistinct, boolean isAllColumns, String aggregateName, List<org.apache.calcite.rex.RexNode> aggregateParameters) throws SemanticException
SemanticExceptiondefault org.apache.calcite.rex.RexNode foldExpression(org.apache.calcite.rex.RexNode expr)
boolean isAndFunction(FunctionInfo fi)
boolean isOrFunction(FunctionInfo fi)
boolean isInFunction(FunctionInfo fi)
boolean isCompareFunction(FunctionInfo fi)
boolean isEqualFunction(FunctionInfo fi)
boolean isNSCompareFunction(FunctionInfo fi)
boolean isConsistentWithinQuery(FunctionInfo fi)
boolean isStateful(FunctionInfo fi)
Copyright © 2022 The Apache Software Foundation. All rights reserved.