/** Creates a LogicalTableModify. */ public static LogicalTableModify create(RelOptTable table, Prepare.CatalogReader schema, RelNode input, Operation operation, List<String> updateColumnList, List<RexNode> sourceExpressionList, boolean flattened) { final RelOptCluster cluster = input.getCluster(); final RelTraitSet traitSet = cluster.traitSetOf(Convention.NONE); return new LogicalTableModify(cluster, traitSet, table, schema, input, operation, updateColumnList, sourceExpressionList, flattened); }
/** Creates a LogicalTableModify. */ public static LogicalTableModify create(RelOptTable table, Prepare.CatalogReader schema, RelNode input, Operation operation, List<String> updateColumnList, List<RexNode> sourceExpressionList, boolean flattened) { final RelOptCluster cluster = input.getCluster(); final RelTraitSet traitSet = cluster.traitSetOf(Convention.NONE); return new LogicalTableModify(cluster, traitSet, table, schema, input, operation, updateColumnList, sourceExpressionList, flattened); }
@Override public TableModify toModificationRel(RelOptCluster cluster, RelOptTable table, CatalogReader catalogReader, RelNode input, Operation operation, List<String> updateColumnList, List<RexNode> sourceExpressionList, boolean flattened) { jdbcSchema.convention.register(cluster.getPlanner()); return new LogicalTableModify(cluster, cluster.traitSetOf(Convention.NONE), table, catalogReader, input, operation, updateColumnList, sourceExpressionList, flattened); }
@Override public TableModify toModificationRel(RelOptCluster cluster, RelOptTable table, CatalogReader catalogReader, RelNode input, Operation operation, List<String> updateColumnList, List<RexNode> sourceExpressionList, boolean flattened) { jdbcSchema.convention.register(cluster.getPlanner()); return new LogicalTableModify(cluster, cluster.traitSetOf(Convention.NONE), table, catalogReader, input, operation, updateColumnList, sourceExpressionList, flattened); }
@Override public LogicalTableModify copy(RelTraitSet traitSet, List<RelNode> inputs) { assert traitSet.containsIfApplicable(Convention.NONE); return new LogicalTableModify(getCluster(), traitSet, table, catalogReader, sole(inputs), getOperation(), getUpdateColumnList(), getSourceExpressionList(), isFlattened()); } }
@Override public LogicalTableModify copy(RelTraitSet traitSet, List<RelNode> inputs) { assert traitSet.containsIfApplicable(Convention.NONE); return new LogicalTableModify(getCluster(), traitSet, table, catalogReader, sole(inputs), getOperation(), getUpdateColumnList(), getSourceExpressionList(), isFlattened()); } }
public JdbcRelBuilder insertCopying( LogicalTableModify original, Table table ) { List<String> name = JdbcTableUtils.getQualifiedName(original.getTable(), table); push(new LogicalTableModify( cluster, original.getTraitSet(), relOptSchema.getTableForMember(name), original.getCatalogReader(), peek(), TableModify.Operation.INSERT, null, null, original.isFlattened() )); return this; }