org.apache.calcite.plan.RelOptUtil.getContext()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(2.5k)|赞(0)|评价(0)|浏览(73)

本文整理了Java中org.apache.calcite.plan.RelOptUtil.getContext方法的一些代码示例,展示了RelOptUtil.getContext的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RelOptUtil.getContext方法的具体详情如下:
包路径:org.apache.calcite.plan.RelOptUtil
类名称:RelOptUtil
方法名:getContext

RelOptUtil.getContext介绍

[英]Returns a simple org.apache.calcite.plan.RelOptTable.ToRelContext.
[中]返回一个简单的组织。阿帕奇。方解石计划可重新安装。ToRelContext。

代码示例

代码示例来源:origin: Qihoo360/Quicksql

@Override
  public void visit(RelNode node, int ordinal, RelNode parent) {
    if (node instanceof TableScan) {
      final RelOptCluster cluster = node.getCluster();
      final RelOptTable.ToRelContext context =
        RelOptUtil.getContext(cluster);
      final RelNode r = node.getTable().toRel(context);
      plan.registerClass(r);
    }
    super.visit(node, ordinal, parent);
  }
};

代码示例来源:origin: Qihoo360/Quicksql

public void onMatch(RelOptRuleCall call) {
  final LogicalTableScan oldRel = call.rel(0);
  RelNode newRel =
    oldRel.getTable().toRel(
      RelOptUtil.getContext(oldRel.getCluster()));
  call.transformTo(newRel);
 }
}

代码示例来源:origin: Qihoo360/Quicksql

@Override public void visit(RelNode node, int ordinal, RelNode parent) {
  if (node instanceof TableScan) {
   final RelOptCluster cluster = node.getCluster();
   final RelOptTable.ToRelContext context =
     RelOptUtil.getContext(cluster);
   final RelNode r = node.getTable().toRel(context);
   planner.registerClass(r);
  }
  super.visit(node, ordinal, parent);
 }
};

代码示例来源:origin: Qihoo360/Quicksql

LcsTableScan tmpFactRel =
  (LcsTableScan) factTable.toRel(
    RelOptUtil.getContext(factRel.getCluster()));

代码示例来源:origin: Qihoo360/Quicksql

@Override public RelNode visit(TableScan scan) {
 RelOptTable relOptTable = scan.getTable();
 final Table table = relOptTable.unwrap(Table.class);
 if (table.equals(starTable.tables.get(0))) {
  Mappings.TargetMapping mapping =
    Mappings.createShiftMapping(
      starRelOptTable.getRowType().getFieldCount(),
      0, 0, relOptTable.getRowType().getFieldCount());
  final RelOptCluster cluster = scan.getCluster();
  final RelNode scan2 =
    starRelOptTable.toRel(RelOptUtil.getContext(cluster));
  return RelOptUtil.createProject(scan2,
    Mappings.asList(mapping.inverse()));
 }
 return scan;
}

代码示例来源:origin: qubole/quark

final QuarkTile quarkTile) {
RelNode rel = aggregateRelOptTable.toRel(RelOptUtil.getContext(scan.getCluster()));

代码示例来源:origin: qubole/quark

RelOptTableImpl.create(table.getRelOptSchema(), aggregateTableRowType,
    tableEntry, rowCount);
RelNode rel = aggregateRelOptTable.toRel(RelOptUtil.getContext(cluster));

代码示例来源:origin: Qihoo360/Quicksql

tableEntry,
    rowCount);
relBuilder.push(aggregateRelOptTable.toRel(RelOptUtil.getContext(cluster)));
if (tileKey == null) {
 if (CalcitePrepareImpl.DEBUG) {

相关文章

微信公众号

最新文章

更多

RelOptUtil类方法