org.eigenbase.sql.type
Class TableFunctionReturnTypeInference

java.lang.Object
  extended by org.eigenbase.sql.type.ExplicitReturnTypeInference
      extended by org.eigenbase.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.

Version:
$Id: //open/dev/farrago/src/org/eigenbase/sql/type/TableFunctionReturnTypeInference.java#9 $
Author:
John V. Sichi

Field Summary
private  Set<RelColumnMapping> columnMappings
           
private  List<String> paramNames
           
 
Constructor Summary
TableFunctionReturnTypeInference(RelDataType unexpandedOutputType, List<String> paramNames)
           
 
Method Summary
private  void addOutputColumn(List<String> expandedFieldNames, List<RelDataType> expandedOutputTypes, int iInputColumn, int iCursor, SqlOperatorBinding opBinding, RelDataTypeField cursorField)
           
 Set<RelColumnMapping> getColumnMappings()
           
 RelDataType inferReturnType(SqlOperatorBinding opBinding)
          Infers the return type of a call to an SqlOperator.
 
Methods inherited from class org.eigenbase.sql.type.ExplicitReturnTypeInference
getExplicitType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

paramNames

private final List<String> paramNames

columnMappings

private Set<RelColumnMapping> columnMappings
Constructor Detail

TableFunctionReturnTypeInference

public TableFunctionReturnTypeInference(RelDataType unexpandedOutputType,
                                        List<String> paramNames)
Method Detail

getColumnMappings

public Set<RelColumnMapping> getColumnMappings()

inferReturnType

public RelDataType inferReturnType(SqlOperatorBinding opBinding)
Description copied from interface: SqlReturnTypeInference
Infers the return type of a call to an SqlOperator.

Specified by:
inferReturnType in interface SqlReturnTypeInference
Overrides:
inferReturnType in class ExplicitReturnTypeInference
Parameters:
opBinding - description of operator binding
Returns:
inferred type

addOutputColumn

private void addOutputColumn(List<String> expandedFieldNames,
                             List<RelDataType> expandedOutputTypes,
                             int iInputColumn,
                             int iCursor,
                             SqlOperatorBinding opBinding,
                             RelDataTypeField cursorField)