public class NullInitializerExpressionFactory extends Object implements InitializerExpressionFactory
InitializerExpressionFactory that always supplies NULL.| Modifier and Type | Field and Description |
|---|---|
static InitializerExpressionFactory |
INSTANCE |
| Constructor and Description |
|---|
NullInitializerExpressionFactory() |
| Modifier and Type | Method and Description |
|---|---|
ColumnStrategy |
generationStrategy(RelOptTable table,
int iColumn)
Returns how a column is populated.
|
boolean |
isGeneratedAlways(RelOptTable table,
int iColumn)
Whether a column is always generated.
|
RexNode |
newAttributeInitializer(RelDataType type,
SqlFunction constructor,
int iAttribute,
List<RexNode> constructorArgs,
InitializerContext context)
Creates an expression which evaluates to the initializer expression for a
particular attribute of a structured type.
|
RexNode |
newColumnDefaultValue(RelOptTable table,
int iColumn,
InitializerContext context)
Creates an expression which evaluates to the default value for a
particular column.
|
@Nullable BiFunction<InitializerContext,RelNode,RelNode> |
postExpressionConversionHook()
Creates a hook function to customize the relational expression right after the column
expressions are converted.
|
public static final InitializerExpressionFactory INSTANCE
public boolean isGeneratedAlways(RelOptTable table, int iColumn)
InitializerExpressionFactoryisGeneratedAlways in interface InitializerExpressionFactoryInitializerExpressionFactory.generationStrategy(RelOptTable, int)public ColumnStrategy generationStrategy(RelOptTable table, int iColumn)
InitializerExpressionFactorygenerationStrategy in interface InitializerExpressionFactorytable - the table containing the columniColumn - the 0-based offset of the column in the tableRelOptTable.getColumnStrategies()public RexNode newColumnDefaultValue(RelOptTable table, int iColumn, InitializerContext context)
InitializerExpressionFactoryIf the default value comes from a un-validated SqlNode,
make sure to invoke InitializerContext.validateExpression(org.apache.calcite.rel.type.RelDataType, org.apache.calcite.sql.SqlNode) first before you actually
do the conversion with method InitializerContext.convertExpression(org.apache.calcite.sql.SqlNode).
newColumnDefaultValue in interface InitializerExpressionFactorytable - the table containing the columniColumn - the 0-based offset of the column in the tablecontext - Context for creating the expressionpublic @Nullable BiFunction<InitializerContext,RelNode,RelNode> postExpressionConversionHook()
InitializerExpressionFactorypostExpressionConversionHook in interface InitializerExpressionFactoryInitializerExpressionFactory.newColumnDefaultValue(RelOptTable, int, InitializerContext)public RexNode newAttributeInitializer(RelDataType type, SqlFunction constructor, int iAttribute, List<RexNode> constructorArgs, InitializerContext context)
InitializerExpressionFactorynewAttributeInitializer in interface InitializerExpressionFactorytype - the structured typeconstructor - the constructor invoked to initialize the typeiAttribute - the 0-based offset of the attribute in the typeconstructorArgs - arguments passed to the constructor invocationcontext - Context for creating the expressionCopyright © 2012-2022 Apache Software Foundation. All Rights Reserved.