public class HiveSqlFunction
extends org.apache.calcite.sql.SqlFunction
| Constructor and Description |
|---|
HiveSqlFunction(String name,
org.apache.calcite.sql.SqlKind kind,
org.apache.calcite.sql.type.SqlReturnTypeInference returnTypeInference,
org.apache.calcite.sql.type.SqlOperandTypeInference operandTypeInference,
org.apache.calcite.sql.type.SqlOperandTypeChecker operandTypeChecker,
org.apache.calcite.sql.SqlFunctionCategory category,
boolean deterministic,
boolean runtimeConstant) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isDeterministic() |
boolean |
isRuntimeConstant()
Whether it is safe to cache or materialize plans containing this operator.
|
deriveType, getFunctionType, getNameAsId, getParamNames, getParamTypes, getSqlIdentifier, getSyntax, isQuantifierAllowed, unparse, validateCall, validateQuantifieracceptCall, acceptCall, adjustType, allowsFraming, argumentMustBeScalar, checkOperandCount, checkOperandTypes, constructArgNameList, constructArgTypeList, constructOperandList, createCall, createCall, createCall, createCall, equals, getAllowedSignatures, getAllowedSignatures, getKind, getLeftPrec, getMonotonicity, getMonotonicity, getName, getOperandCountRange, getOperandTypeChecker, getOperandTypeInference, getReturnTypeInference, getRightPrec, getSignatureTemplate, getStrongPolicyInference, hashCode, inferReturnType, inferReturnType, isAggregator, isDynamicFunction, isGroup, isGroupAuxiliary, isName, isSymmetrical, leftPrec, preValidateCall, requiresDecimalExpansion, requiresOrder, requiresOver, rewriteCall, rightPrec, toString, unparseListClause, unparseListClause, validateOperands, validRexOperandspublic HiveSqlFunction(String name, org.apache.calcite.sql.SqlKind kind, org.apache.calcite.sql.type.SqlReturnTypeInference returnTypeInference, org.apache.calcite.sql.type.SqlOperandTypeInference operandTypeInference, org.apache.calcite.sql.type.SqlOperandTypeChecker operandTypeChecker, org.apache.calcite.sql.SqlFunctionCategory category, boolean deterministic, boolean runtimeConstant)
public boolean isDeterministic()
isDeterministic in class org.apache.calcite.sql.SqlOperatorpublic boolean isRuntimeConstant()
SqlOperator.isDynamicFunction() because it has
different implications, e.g., a dynamic function will not be reduced in
Calcite since plans may be cached in the context of prepared statements.
In our case, we check whether a plan contains runtime constants before
constant folding happens, hence we can let Calcite reduce these functions.Copyright © 2022 The Apache Software Foundation. All rights reserved.