org.eigenbase.sql2rel
Class SqlToRelConverter.NullDefaultValueFactory

java.lang.Object
  extended by org.eigenbase.sql2rel.SqlToRelConverter.NullDefaultValueFactory
All Implemented Interfaces:
DefaultValueFactory
Enclosing class:
SqlToRelConverter

 class SqlToRelConverter.NullDefaultValueFactory
extends Object
implements DefaultValueFactory

An implementation of DefaultValueFactory which always supplies NULL.


Constructor Summary
SqlToRelConverter.NullDefaultValueFactory()
           
 
Method Summary
 boolean isGeneratedAlways(RelOptTable table, int iColumn)
          Whether a column is always generated.
 RexNode newAttributeInitializer(RelDataType type, SqlFunction constructor, int iAttribute, RexNode[] constructorArgs)
          Creates an expression which evaluates to the initializer expression for a particular attribute of a structured type.
 RexNode newColumnDefaultValue(RelOptTable table, int iColumn)
          Creates an expression which evaluates to the default value for a particular column.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SqlToRelConverter.NullDefaultValueFactory

SqlToRelConverter.NullDefaultValueFactory()
Method Detail

isGeneratedAlways

public boolean isGeneratedAlways(RelOptTable table,
                                 int iColumn)
Description copied from interface: DefaultValueFactory
Whether a column is always generated. If a column is always generated, then non-generated values cannot be inserted into the column.

Specified by:
isGeneratedAlways in interface DefaultValueFactory

newColumnDefaultValue

public RexNode newColumnDefaultValue(RelOptTable table,
                                     int iColumn)
Description copied from interface: DefaultValueFactory
Creates an expression which evaluates to the default value for a particular column.

Specified by:
newColumnDefaultValue in interface DefaultValueFactory
Parameters:
table - the table containing the column
iColumn - the 0-based offset of the column in the table
Returns:
default value expression

newAttributeInitializer

public RexNode newAttributeInitializer(RelDataType type,
                                       SqlFunction constructor,
                                       int iAttribute,
                                       RexNode[] constructorArgs)
Description copied from interface: DefaultValueFactory
Creates an expression which evaluates to the initializer expression for a particular attribute of a structured type.

Specified by:
newAttributeInitializer in interface DefaultValueFactory
Parameters:
type - the structured type
constructor - the constructor invoked to initialize the type
iAttribute - the 0-based offset of the attribute in the type
constructorArgs - arguments passed to the constructor invocation
Returns:
default value expression