Package net.hydromatic.morel.foreign
Class CalciteFunctions
java.lang.Object
net.hydromatic.morel.foreign.CalciteFunctions
Calcite table-valued user-defined function that evaluates a Morel
expression and returns the result as a relation.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static interfaceOperand to a user-defined function.static classExecution context.static classCalcite user-defined function that applies a Morel function (or closure) to an argument.static classCalcite user-defined function that evaluates a Morel string and returns a scalar value.static classCalcite user-defined function that evaluates a Morel string and returns a table. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.apache.calcite.sql.SqlOperatorstatic final org.apache.calcite.sql.SqlOperatorstatic final org.apache.calcite.sql.SqlOperatorstatic final ThreadLocal<CalciteFunctions.Context> static final ThreadLocal<EvalEnv> Used to pass Morel's evaluation environment into Calcite, so that it is available if Calcite calls back into Morel. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static org.apache.calcite.rel.type.RelDataTypeinferReturnType(org.apache.calcite.sql.SqlOperatorBinding b)
-
Field Details
-
THREAD_ENV
-
THREAD_EVAL_ENV
Used to pass Morel's evaluation environment into Calcite, so that it is available if Calcite calls back into Morel.It would be better if we passed the environment, or variables we know are needed, as an argument at the Calcite-to-Morel (see
Calcite.code(net.hydromatic.morel.compile.Environment, org.apache.calcite.rel.RelNode, net.hydromatic.morel.type.Type)) and Morel-to-Calcite (seeTABLE_OPERATORandSCALAR_OPERATOR) boundaries. -
TABLE_OPERATOR
public static final org.apache.calcite.sql.SqlOperator TABLE_OPERATOR -
SCALAR_OPERATOR
public static final org.apache.calcite.sql.SqlOperator SCALAR_OPERATOR -
APPLY_OPERATOR
public static final org.apache.calcite.sql.SqlOperator APPLY_OPERATOR
-
-
Constructor Details
-
CalciteFunctions
private CalciteFunctions()
-
-
Method Details
-
inferReturnType
private static org.apache.calcite.rel.type.RelDataType inferReturnType(org.apache.calcite.sql.SqlOperatorBinding b)
-