Package org.apache.calcite.sql.type
Class TableFunctionReturnTypeInference
- java.lang.Object
-
- org.apache.calcite.sql.type.ExplicitReturnTypeInference
-
- org.apache.calcite.sql.type.TableFunctionReturnTypeInference
-
- All Implemented Interfaces:
SqlReturnTypeInference
public class TableFunctionReturnTypeInference extends ExplicitReturnTypeInference
TableFunctionReturnTypeInference implements rules for deriving table function output row types by expanding references to cursor parameters.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Set<RelColumnMapping>
columnMappings
private boolean
isPassthrough
private java.util.List<java.lang.String>
paramNames
-
Fields inherited from class org.apache.calcite.sql.type.ExplicitReturnTypeInference
protoType
-
-
Constructor Summary
Constructors Constructor Description TableFunctionReturnTypeInference(RelProtoDataType unexpandedOutputType, java.util.List<java.lang.String> paramNames, boolean isPassthrough)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
addOutputColumn(java.util.List<java.lang.String> expandedFieldNames, java.util.List<RelDataType> expandedOutputTypes, int iInputColumn, int iCursor, SqlOperatorBinding opBinding, RelDataTypeField cursorField)
java.util.Set<RelColumnMapping>
getColumnMappings()
RelDataType
inferReturnType(SqlOperatorBinding opBinding)
Infers the return type of a call to anSqlOperator
.
-
-
-
Field Detail
-
paramNames
private final java.util.List<java.lang.String> paramNames
-
columnMappings
private java.util.Set<RelColumnMapping> columnMappings
-
isPassthrough
private final boolean isPassthrough
-
-
Constructor Detail
-
TableFunctionReturnTypeInference
public TableFunctionReturnTypeInference(RelProtoDataType unexpandedOutputType, java.util.List<java.lang.String> paramNames, boolean isPassthrough)
-
-
Method Detail
-
getColumnMappings
public java.util.Set<RelColumnMapping> getColumnMappings()
-
inferReturnType
public RelDataType inferReturnType(SqlOperatorBinding opBinding)
Description copied from interface:SqlReturnTypeInference
Infers the return type of a call to anSqlOperator
.- Specified by:
inferReturnType
in interfaceSqlReturnTypeInference
- Overrides:
inferReturnType
in classExplicitReturnTypeInference
- Parameters:
opBinding
- description of operator binding- Returns:
- inferred type; may be null
-
addOutputColumn
private void addOutputColumn(java.util.List<java.lang.String> expandedFieldNames, java.util.List<RelDataType> expandedOutputTypes, int iInputColumn, int iCursor, SqlOperatorBinding opBinding, RelDataTypeField cursorField)
-
-