Uses of Interface
org.apache.calcite.sql.type.SqlReturnTypeInference
-
Packages that use SqlReturnTypeInference Package Description org.apache.calcite.prepare Preparation of queries (parsing, planning and implementation).org.apache.calcite.sql Provides a SQL parser and object model.org.apache.calcite.sql.fun Defines the set of standard SQL row-level functions and operators.org.apache.calcite.sql.type SQL type system.org.apache.calcite.sql.validate SQL validation. -
-
Uses of SqlReturnTypeInference in org.apache.calcite.prepare
Methods in org.apache.calcite.prepare that return SqlReturnTypeInference Modifier and Type Method Description private static SqlReturnTypeInference
CalciteCatalogReader. infer(AggregateFunction function)
private static SqlReturnTypeInference
CalciteCatalogReader. infer(ScalarFunction function)
-
Uses of SqlReturnTypeInference in org.apache.calcite.sql
Fields in org.apache.calcite.sql declared as SqlReturnTypeInference Modifier and Type Field Description private SqlReturnTypeInference
SqlOperator. returnTypeInference
used to infer the return type of a call to this operatorMethods in org.apache.calcite.sql that return SqlReturnTypeInference Modifier and Type Method Description SqlReturnTypeInference
SqlOperator. getReturnTypeInference()
Constructors in org.apache.calcite.sql with parameters of type SqlReturnTypeInference Constructor Description SqlAggFunction(java.lang.String name, SqlIdentifier sqlIdentifier, SqlKind kind, SqlReturnTypeInference returnTypeInference, SqlOperandTypeInference operandTypeInference, SqlOperandTypeChecker operandTypeChecker, SqlFunctionCategory funcType)
Deprecated.SqlAggFunction(java.lang.String name, SqlIdentifier sqlIdentifier, SqlKind kind, SqlReturnTypeInference returnTypeInference, SqlOperandTypeInference operandTypeInference, SqlOperandTypeChecker operandTypeChecker, SqlFunctionCategory funcType, boolean requiresOrder, boolean requiresOver)
Deprecated.SqlAggFunction(java.lang.String name, SqlIdentifier sqlIdentifier, SqlKind kind, SqlReturnTypeInference returnTypeInference, SqlOperandTypeInference operandTypeInference, SqlOperandTypeChecker operandTypeChecker, SqlFunctionCategory funcType, boolean requiresOrder, boolean requiresOver, Optionality requiresGroupOrder)
Creates a built-in or user-defined SqlAggFunction or window function.SqlAggFunction(java.lang.String name, SqlKind kind, SqlReturnTypeInference returnTypeInference, SqlOperandTypeInference operandTypeInference, SqlOperandTypeChecker operandTypeChecker, SqlFunctionCategory funcType)
Deprecated.SqlAsOperator(java.lang.String name, SqlKind kind, int prec, boolean leftAssoc, SqlReturnTypeInference returnTypeInference, SqlOperandTypeInference operandTypeInference, SqlOperandTypeChecker operandTypeChecker)
SqlBinaryOperator(java.lang.String name, SqlKind kind, int prec, boolean leftAssoc, SqlReturnTypeInference returnTypeInference, SqlOperandTypeInference operandTypeInference, SqlOperandTypeChecker operandTypeChecker)
Creates a SqlBinaryOperator.SqlFunction(java.lang.String name, SqlIdentifier sqlIdentifier, SqlKind kind, SqlReturnTypeInference returnTypeInference, SqlOperandTypeInference operandTypeInference, SqlOperandTypeChecker operandTypeChecker, java.util.List<RelDataType> paramTypes, SqlFunctionCategory category)
Internal constructor.SqlFunction(java.lang.String name, SqlKind kind, SqlReturnTypeInference returnTypeInference, SqlOperandTypeInference operandTypeInference, SqlOperandTypeChecker operandTypeChecker, SqlFunctionCategory category)
Creates a new SqlFunction for a call to a builtin function.SqlFunction(SqlIdentifier sqlIdentifier, SqlReturnTypeInference returnTypeInference, SqlOperandTypeInference operandTypeInference, SqlOperandTypeChecker operandTypeChecker, java.util.List<RelDataType> paramTypes, SqlFunctionCategory funcType)
Creates a placeholder SqlFunction for an invocation of a function with a possibly qualified name.SqlFunctionalOperator(java.lang.String name, SqlKind kind, int pred, boolean isLeftAssoc, SqlReturnTypeInference returnTypeInference, SqlOperandTypeInference operandTypeInference, SqlOperandTypeChecker operandTypeChecker)
SqlGroupedWindowFunction(java.lang.String name, SqlKind kind, SqlGroupedWindowFunction groupFunction, SqlReturnTypeInference returnTypeInference, SqlOperandTypeInference operandTypeInference, SqlOperandTypeChecker operandTypeChecker, SqlFunctionCategory category)
Creates a SqlGroupedWindowFunction.SqlInfixOperator(java.lang.String[] names, SqlKind kind, int precedence, SqlReturnTypeInference returnTypeInference, SqlOperandTypeInference operandTypeInference, SqlOperandTypeChecker operandTypeChecker)
SqlInternalOperator(java.lang.String name, SqlKind kind, int prec, boolean isLeftAssoc, SqlReturnTypeInference returnTypeInference, SqlOperandTypeInference operandTypeInference, SqlOperandTypeChecker operandTypeChecker)
SqlOperator(java.lang.String name, SqlKind kind, int prec, boolean leftAssoc, SqlReturnTypeInference returnTypeInference, SqlOperandTypeInference operandTypeInference, SqlOperandTypeChecker operandTypeChecker)
Creates an operator specifying left/right associativity.SqlOperator(java.lang.String name, SqlKind kind, int leftPrecedence, int rightPrecedence, SqlReturnTypeInference returnTypeInference, SqlOperandTypeInference operandTypeInference, SqlOperandTypeChecker operandTypeChecker)
Creates an operator.SqlPostfixOperator(java.lang.String name, SqlKind kind, int prec, SqlReturnTypeInference returnTypeInference, SqlOperandTypeInference operandTypeInference, SqlOperandTypeChecker operandTypeChecker)
SqlPrefixOperator(java.lang.String name, SqlKind kind, int prec, SqlReturnTypeInference returnTypeInference, SqlOperandTypeInference operandTypeInference, SqlOperandTypeChecker operandTypeChecker)
SqlRankFunction(SqlKind kind, SqlReturnTypeInference returnTypes, boolean requiresOrder)
SqlSetOperator(java.lang.String name, SqlKind kind, int prec, boolean all, SqlReturnTypeInference returnTypeInference, SqlOperandTypeInference operandTypeInference, SqlOperandTypeChecker operandTypeChecker)
SqlSpecialOperator(java.lang.String name, SqlKind kind, int prec, boolean leftAssoc, SqlReturnTypeInference returnTypeInference, SqlOperandTypeInference operandTypeInference, SqlOperandTypeChecker operandTypeChecker)
SqlUnresolvedFunction(SqlIdentifier sqlIdentifier, SqlReturnTypeInference returnTypeInference, SqlOperandTypeInference operandTypeInference, SqlOperandTypeChecker operandTypeChecker, java.util.List<RelDataType> paramTypes, SqlFunctionCategory funcType)
Creates a placeholder SqlUnresolvedFunction for an invocation of a function with a possibly qualified name. -
Uses of SqlReturnTypeInference in org.apache.calcite.sql.fun
Fields in org.apache.calcite.sql.fun declared as SqlReturnTypeInference Modifier and Type Field Description protected static SqlReturnTypeInference
OracleSqlOperatorTable. DECODE_RETURN_TYPE
Return type inference forDECODE
.private static SqlReturnTypeInference
SqlLeadLagAggFunction. RETURN_TYPE
private static SqlReturnTypeInference
SqlTimestampAddFunction. RETURN_TYPE_INFERENCE
private static SqlReturnTypeInference
SqlTimestampDiffFunction. RETURN_TYPE_INFERENCE
Creates a SqlTimestampDiffFunction.Constructors in org.apache.calcite.sql.fun with parameters of type SqlReturnTypeInference Constructor Description SqlAbstractGroupFunction(java.lang.String name, SqlKind kind, SqlReturnTypeInference returnTypeInference, SqlOperandTypeInference operandTypeInference, SqlOperandTypeChecker operandTypeChecker, SqlFunctionCategory category)
Creates a SqlAbstractGroupFunction.SqlBaseContextVariable(java.lang.String name, SqlReturnTypeInference returnType, SqlFunctionCategory category)
Creates a SqlBaseContextVariable.SqlMonotonicBinaryOperator(java.lang.String name, SqlKind kind, int prec, boolean isLeftAssoc, SqlReturnTypeInference returnTypeInference, SqlOperandTypeInference operandTypeInference, SqlOperandTypeChecker operandTypeChecker)
SqlMonotonicUnaryFunction(java.lang.String name, SqlKind kind, SqlReturnTypeInference returnTypeInference, SqlOperandTypeInference operandTypeInference, SqlOperandTypeChecker operandTypeChecker, SqlFunctionCategory funcType)
-
Uses of SqlReturnTypeInference in org.apache.calcite.sql.type
Classes in org.apache.calcite.sql.type that implement SqlReturnTypeInference Modifier and Type Class Description class
CursorReturnTypeInference
Returns the rowtype of a cursor of the operand at a particular 0-based ordinal position.class
ExplicitReturnTypeInference
ASqlReturnTypeInference
which always returns the same SQL type.class
MatchReturnTypeInference
Returns the first type that matches a set of givenSqlTypeName
s.class
OrdinalReturnTypeInference
Returns the type of the operand at a particular 0-based ordinal position.class
SqlReturnTypeInferenceChain
Strategy to infer the type of an operator call from the type of the operands by using a series ofSqlReturnTypeInference
rules in a given order.class
SqlTypeTransformCascade
Strategy to infer the type of an operator call from the type of the operands by using oneSqlReturnTypeInference
rule and a combination ofSqlTypeTransform
sclass
TableFunctionReturnTypeInference
TableFunctionReturnTypeInference implements rules for deriving table function output row types by expanding references to cursor parameters.Fields in org.apache.calcite.sql.type declared as SqlReturnTypeInference Modifier and Type Field Description static SqlReturnTypeInference
ReturnTypes. AGG_SUM
Type-inference strategy for SUM aggregate function inferred from the operand type, and nullable if the call occurs within a "GROUP BY ()" query.static SqlReturnTypeInference
ReturnTypes. AGG_SUM_EMPTY_IS_ZERO
Type-inference strategy for $SUM0 aggregate function inferred from the operand type.static SqlReturnTypeInference
ReturnTypes. ARG0
Type-inference strategy whereby the result type of a call is the type of the operand #0 (0-based).static SqlReturnTypeInference
ReturnTypes. ARG0_FORCE_NULLABLE
Type-inference strategy whereby the result type of a call is the type of the operand #0 (0-based), with nulls always allowed.static SqlReturnTypeInference
ReturnTypes. ARG0_INTERVAL
static SqlReturnTypeInference
ReturnTypes. ARG0_INTERVAL_NULLABLE
static SqlReturnTypeInference
ReturnTypes. ARG0_NULLABLE
Type-inference strategy whereby the result type of a call is the type of the operand #0 (0-based).static SqlReturnTypeInference
ReturnTypes. ARG0_NULLABLE_IF_EMPTY
Type-inference strategy whereby the result type of a call is the type of the operand #0 (0-based), and nullable if the call occurs within a "GROUP BY ()" query.static SqlReturnTypeInference
ReturnTypes. ARG0_NULLABLE_VARYING
Type-inference strategy whereby the result type of a call is VARYING the type of the first argument.static SqlReturnTypeInference
ReturnTypes. ARG0_OR_EXACT_NO_SCALE
Type-inference strategy whereby the result type of a call isReturnTypes.DECIMAL_SCALE0
with a fallback toReturnTypes.ARG0
This rule is used for floor, ceiling.static SqlReturnTypeInference
ReturnTypes. ARG1
Type-inference strategy whereby the result type of a call is the type of the operand #1 (0-based).static SqlReturnTypeInference
ReturnTypes. ARG1_NULLABLE
Type-inference strategy whereby the result type of a call is the type of the operand #1 (0-based).static SqlReturnTypeInference
ReturnTypes. ARG2
Type-inference strategy whereby the result type of a call is the type of operand #2 (0-based).static SqlReturnTypeInference
ReturnTypes. ARG2_NULLABLE
Type-inference strategy whereby the result type of a call is the type of operand #2 (0-based).static SqlReturnTypeInference
ReturnTypes. AVG_AGG_FUNCTION
static SqlReturnTypeInference
ReturnTypes. BIGINT
Type-inference strategy whereby the result type of a call is a Bigintstatic SqlReturnTypeInference
ReturnTypes. BIGINT_FORCE_NULLABLE
Type-inference strategy whereby the result type of a call is a nullable Bigintstatic SqlReturnTypeInference
ReturnTypes. BIGINT_NULLABLE
Type-inference strategy whereby the result type of a call is an Bigint with nulls allowed if any of the operands allow nulls.static SqlReturnTypeInference
ReturnTypes. BOOLEAN
Type-inference strategy whereby the result type of a call is Boolean.static SqlReturnTypeInference
ReturnTypes. BOOLEAN_FORCE_NULLABLE
Type-inference strategy whereby the result type of a call is a nullable Boolean.static SqlReturnTypeInference
ReturnTypes. BOOLEAN_NOT_NULL
Type-inference strategy whereby the result type of a call is Boolean not null.static SqlReturnTypeInference
ReturnTypes. BOOLEAN_NULLABLE
Type-inference strategy whereby the result type of a call is Boolean, with nulls allowed if any of the operands allow nulls.static SqlReturnTypeInference
ReturnTypes. BOOLEAN_NULLABLE_OPTIMIZED
Type-inference strategy with similar effect toReturnTypes.BOOLEAN_NULLABLE
, which is more efficient, but can only be used if all arguments are BOOLEAN.static SqlReturnTypeInference
ReturnTypes. COLUMN_LIST
Type-inference strategy that always returns "COLUMN_LIST".static SqlReturnTypeInference
ReturnTypes. COVAR_REGR_FUNCTION
static SqlReturnTypeInference
ReturnTypes. CURSOR
Type-inference strategy that always returns "CURSOR".static SqlReturnTypeInference
ReturnTypes. DATE
Type-inference strategy whereby the result type of a call is Date.static SqlReturnTypeInference
ReturnTypes. DECIMAL_PRODUCT
Type-inference strategy whereby the result type of a call is the decimal product of two exact numeric operands where at least one of the operands is a decimal.static SqlReturnTypeInference
ReturnTypes. DECIMAL_PRODUCT_NULLABLE
Same asReturnTypes.DECIMAL_PRODUCT
but returns with nullability if any of the operands is nullable by usingSqlTypeTransforms.TO_NULLABLE
static SqlReturnTypeInference
ReturnTypes. DECIMAL_QUOTIENT
Type-inference strategy whereby the result type of a call is the decimal product of two exact numeric operands where at least one of the operands is a decimal.static SqlReturnTypeInference
ReturnTypes. DECIMAL_QUOTIENT_NULLABLE
Same asReturnTypes.DECIMAL_QUOTIENT
but returns with nullability if any of the operands is nullable by usingSqlTypeTransforms.TO_NULLABLE
static SqlReturnTypeInference
ReturnTypes. DECIMAL_SCALE0
Type-inference strategy for a call where the first argument is a decimal.static SqlReturnTypeInference
ReturnTypes. DECIMAL_SUM
Type-inference strategy whereby the result type of a call is the decimal sum of two exact numeric operands where at least one of the operands is a decimal.static SqlReturnTypeInference
ReturnTypes. DECIMAL_SUM_NULLABLE
Same asReturnTypes.DECIMAL_SUM
but returns with nullability if any of the operands is nullable by usingSqlTypeTransforms.TO_NULLABLE
.static SqlReturnTypeInference
ReturnTypes. DOUBLE
Type-inference strategy whereby the result type of a call is Double.static SqlReturnTypeInference
ReturnTypes. DOUBLE_NULLABLE
Type-inference strategy whereby the result type of a call is Double with nulls allowed if any of the operands allow nulls.static SqlReturnTypeInference
ReturnTypes. DYADIC_STRING_SUM_PRECISION
Type-inference strategy whereby the result type of a call is the same type as the input types but with the combined length of the two first types if types are of char type the type with the highest coercibility will be used result is varying if either input is; otherwise fixedstatic SqlReturnTypeInference
ReturnTypes. DYADIC_STRING_SUM_PRECISION_NULLABLE
Same asReturnTypes.DYADIC_STRING_SUM_PRECISION
and usingSqlTypeTransforms.TO_NULLABLE
static SqlReturnTypeInference
ReturnTypes. DYADIC_STRING_SUM_PRECISION_NULLABLE_VARYING
static SqlReturnTypeInference
ReturnTypes. FRACTIONAL_RANK
Type-inference strategy for theCUME_DIST
andPERCENT_RANK
aggregate functions.static SqlReturnTypeInference
ReturnTypes. HISTOGRAM
Type-inference strategy for Histogram agg supportstatic SqlReturnTypeInference
ReturnTypes. INTEGER
Type-inference strategy whereby the result type of a call is an Integer.static SqlReturnTypeInference
ReturnTypes. INTEGER_NULLABLE
Type-inference strategy whereby the result type of a call is an Integer with nulls allowed if any of the operands allow nulls.static SqlReturnTypeInference
ReturnTypes. INTEGER_QUOTIENT_NULLABLE
Type-inference strategy whereby the result type of a call isReturnTypes.ARG0_INTERVAL_NULLABLE
andReturnTypes.LEAST_RESTRICTIVE
.static SqlReturnTypeInference
ReturnTypes. LEAST_RESTRICTIVE
Type-inference strategy whereby the result type of a call is using its operands biggest type, using the SQL:1999 rules described in "Data types of results of aggregations".static SqlReturnTypeInference
ReturnTypes. MULTISET
Returns the same type as the multiset carries.static SqlReturnTypeInference
ReturnTypes. MULTISET_ELEMENT_NULLABLE
Returns the element type of a multisetstatic SqlReturnTypeInference
ReturnTypes. MULTISET_NULLABLE
Same asReturnTypes.MULTISET
but returns with nullability if any of the operands is nullable.static SqlReturnTypeInference
ReturnTypes. MULTISET_PROJECT_ONLY
Returns the type of the only column of a multiset.static SqlReturnTypeInference
ReturnTypes. MULTISET_PROJECT0
Returns a multiset of column #0 of a multiset.static SqlReturnTypeInference
ReturnTypes. MULTISET_RECORD
Returns a multiset of the first column of a multiset.static SqlReturnTypeInference
ReturnTypes. NULLABLE_SUM
Type-inference strategy whereby the result type of a call isReturnTypes.DECIMAL_SUM_NULLABLE
with a fallback toReturnTypes.LEAST_RESTRICTIVE
These rules are used for addition and subtraction.static SqlReturnTypeInference
ReturnTypes. PRODUCT_NULLABLE
Type-inference strategy whereby the result type of a call isReturnTypes.DECIMAL_PRODUCT_NULLABLE
with a fallback toReturnTypes.ARG0_INTERVAL_NULLABLE
andReturnTypes.LEAST_RESTRICTIVE
.static SqlReturnTypeInference
ReturnTypes. QUOTIENT_NULLABLE
Type-inference strategy whereby the result type of a call isReturnTypes.DECIMAL_QUOTIENT_NULLABLE
with a fallback toReturnTypes.ARG0_INTERVAL_NULLABLE
andReturnTypes.LEAST_RESTRICTIVE
These rules are used for division.static SqlReturnTypeInference
ReturnTypes. RANK
Type-inference strategy for theNTILE
,RANK
,DENSE_RANK
, andROW_NUMBER
aggregate functions.static SqlReturnTypeInference
ReturnTypes. RECORD_TO_SCALAR
Returns the field type of a structured type which has only one field.private SqlReturnTypeInference
SqlTypeTransformCascade. rule
static SqlReturnTypeInference
ReturnTypes. SCOPE
Type-inference strategy where the expression is assumed to be registered as aSqlValidatorNamespace
, and therefore the result type of the call is the type of that namespace.static SqlReturnTypeInference
ReturnTypes. TIME
Type-inference strategy whereby the result type of a call is Time(0).static SqlReturnTypeInference
ReturnTypes. TIME_NULLABLE
Type-inference strategy whereby the result type of a call is nullable Time(0).static SqlReturnTypeInference
ReturnTypes. TO_MULTISET
Returns a multiset type.static SqlReturnTypeInference
ReturnTypes. VARCHAR_2000
Type-inference strategy that always returns "VARCHAR(2000)".Fields in org.apache.calcite.sql.type with type parameters of type SqlReturnTypeInference Modifier and Type Field Description private com.google.common.collect.ImmutableList<SqlReturnTypeInference>
SqlReturnTypeInferenceChain. rules
Methods in org.apache.calcite.sql.type with parameters of type SqlReturnTypeInference Modifier and Type Method Description static SqlTypeTransformCascade
ReturnTypes. cascade(SqlReturnTypeInference rule, SqlTypeTransform... transforms)
Creates a return-type inference that applies a rule then a sequence of transforms.static SqlReturnTypeInferenceChain
ReturnTypes. chain(SqlReturnTypeInference... rules)
Constructors in org.apache.calcite.sql.type with parameters of type SqlReturnTypeInference Constructor Description SqlReturnTypeInferenceChain(SqlReturnTypeInference... rules)
Creates a SqlReturnTypeInferenceChain from an array of rules.SqlTypeTransformCascade(SqlReturnTypeInference rule, SqlTypeTransform... transforms)
Creates a SqlTypeTransformCascade from a rule and an array of one or more transforms. -
Uses of SqlReturnTypeInference in org.apache.calcite.sql.validate
Constructors in org.apache.calcite.sql.validate with parameters of type SqlReturnTypeInference Constructor Description SqlUserDefinedAggFunction(SqlIdentifier opName, SqlReturnTypeInference returnTypeInference, SqlOperandTypeInference operandTypeInference, SqlOperandTypeChecker operandTypeChecker, AggregateFunction function, boolean requiresOrder, boolean requiresOver, Optionality requiresGroupOrder, RelDataTypeFactory typeFactory)
Creates a SqlUserDefinedAggFunction.SqlUserDefinedFunction(SqlIdentifier opName, SqlReturnTypeInference returnTypeInference, SqlOperandTypeInference operandTypeInference, SqlOperandTypeChecker operandTypeChecker, java.util.List<RelDataType> paramTypes, Function function)
Creates aSqlUserDefinedFunction
.SqlUserDefinedFunction(SqlIdentifier opName, SqlReturnTypeInference returnTypeInference, SqlOperandTypeInference operandTypeInference, SqlOperandTypeChecker operandTypeChecker, java.util.List<RelDataType> paramTypes, Function function, SqlFunctionCategory category)
Constructor used internally and by derived classes.SqlUserDefinedTableFunction(SqlIdentifier opName, SqlReturnTypeInference returnTypeInference, SqlOperandTypeInference operandTypeInference, SqlOperandTypeChecker operandTypeChecker, java.util.List<RelDataType> paramTypes, TableFunction function)
SqlUserDefinedTableMacro(SqlIdentifier opName, SqlReturnTypeInference returnTypeInference, SqlOperandTypeInference operandTypeInference, SqlOperandTypeChecker operandTypeChecker, java.util.List<RelDataType> paramTypes, TableMacro tableMacro)
-