当前位置: 首页>>代码示例>>Java>>正文


Java TableModify.Operation方法代码示例

本文整理汇总了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()));
  }
}
 
开发者ID:apache,项目名称:beam,代码行数:34,代码来源:BeamIOSinkRule.java

示例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);
}
 
开发者ID:apache,项目名称:calcite,代码行数:13,代码来源:SqlCreateTable.java

示例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);
 
开发者ID:apache,项目名称:calcite,代码行数:11,代码来源:ModifiableTable.java

示例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);
}
 
开发者ID:apache,项目名称:calcite,代码行数:8,代码来源:FrameworksTest.java

示例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);
}
 
开发者ID:diennea,项目名称:herddb,代码行数:6,代码来源:CalcitePlanner.java


注:本文中的org.apache.calcite.rel.core.TableModify.Operation方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。