本文整理汇总了Java中org.apache.calcite.rel.core.TableModify.Operation方法的典型用法代码示例。如果您正苦于以下问题:Java TableModify.Operation方法的具体用法?Java TableModify.Operation怎么用?Java TableModify.Operation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.calcite.rel.core.TableModify
的用法示例。
在下文中一共展示了TableModify.Operation方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: convert
import org.apache.calcite.rel.core.TableModify; //导入方法依赖的package包/类
@Override
public RelNode convert(RelNode rel) {
final TableModify tableModify = (TableModify) rel;
final RelNode input = tableModify.getInput();
final RelOptCluster cluster = tableModify.getCluster();
final RelTraitSet traitSet = tableModify.getTraitSet().replace(BeamLogicalConvention.INSTANCE);
final RelOptTable relOptTable = tableModify.getTable();
final Prepare.CatalogReader catalogReader = tableModify.getCatalogReader();
final RelNode convertedInput = convert(input,
input.getTraitSet().replace(BeamLogicalConvention.INSTANCE));
final TableModify.Operation operation = tableModify.getOperation();
final List<String> updateColumnList = tableModify.getUpdateColumnList();
final List<RexNode> sourceExpressionList = tableModify.getSourceExpressionList();
final boolean flattened = tableModify.isFlattened();
final Table table = tableModify.getTable().unwrap(Table.class);
switch (table.getJdbcTableType()) {
case TABLE:
case STREAM:
if (operation != TableModify.Operation.INSERT) {
throw new UnsupportedOperationException(
String.format("Streams doesn't support %s modify operation", operation));
}
return new BeamIOSinkRel(cluster, traitSet,
relOptTable, catalogReader, convertedInput, operation, updateColumnList,
sourceExpressionList, flattened);
default:
throw new IllegalArgumentException(
String.format("Unsupported table type: %s", table.getJdbcTableType()));
}
}
示例2: toModificationRel
import org.apache.calcite.rel.core.TableModify; //导入方法依赖的package包/类
public TableModify toModificationRel(
RelOptCluster cluster,
RelOptTable table,
Prepare.CatalogReader catalogReader,
RelNode child,
TableModify.Operation operation,
List<String> updateColumnList,
List<RexNode> sourceExpressionList,
boolean flattened) {
return LogicalTableModify.create(table, catalogReader, child, operation,
updateColumnList, sourceExpressionList, flattened);
}
示例3: toModificationRel
import org.apache.calcite.rel.core.TableModify; //导入方法依赖的package包/类
/** Creates a relational expression that modifies this table. */
TableModify toModificationRel(
RelOptCluster cluster,
RelOptTable table,
Prepare.CatalogReader catalogReader,
RelNode child,
TableModify.Operation operation,
List<String> updateColumnList,
List<RexNode> sourceExpressionList,
boolean flattened);
示例4: toModificationRel
import org.apache.calcite.rel.core.TableModify; //导入方法依赖的package包/类
public TableModify toModificationRel(RelOptCluster cluster,
RelOptTable table, Prepare.CatalogReader catalogReader, RelNode child,
TableModify.Operation operation, List<String> updateColumnList,
List<RexNode> sourceExpressionList, boolean flattened) {
return LogicalTableModify.create(table, catalogReader, child, operation,
updateColumnList, sourceExpressionList, flattened);
}
示例5: toModificationRel
import org.apache.calcite.rel.core.TableModify; //导入方法依赖的package包/类
@Override
public TableModify toModificationRel(RelOptCluster cluster, RelOptTable table, Prepare.CatalogReader catalogReader, RelNode child, TableModify.Operation operation, List<String> updateColumnList, List<RexNode> sourceExpressionList, boolean flattened) {
return LogicalTableModify.create(table, catalogReader, child, operation,
updateColumnList, sourceExpressionList, flattened);
}