@Override public RelNode toRel(ToRelContext context) { return relOptTable.toRel(context); }
@Override public RelNode toRel(RelOptTable table) { return table.toRel(createToRelContext()); }
public RelNode toRel(RelOptTable table) { return table.toRel(createToRelContext()); }
public RelNode toRel(RelOptTable table) { return table.toRel(createToRelContext()); }
public void onMatch(RelOptRuleCall call) { final LogicalTableScan oldRel = call.rel(0); RelNode newRel = oldRel.getTable().toRel( ViewExpanders.simpleContext(oldRel.getCluster())); call.transformTo(newRel); } }
public void onMatch(RelOptRuleCall call) { final LogicalTableScan oldRel = call.rel(0); RelNode newRel = oldRel.getTable().toRel( RelOptUtil.getContext(oldRel.getCluster())); call.transformTo(newRel); } }
@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); } };
@Override public void visit(RelNode node, int ordinal, RelNode parent) { if (node instanceof TableScan) { final RelOptCluster cluster = node.getCluster(); final RelOptTable.ToRelContext context = ViewExpanders.simpleContext(cluster); final RelNode r = node.getTable().toRel(context); planner.registerClass(r); } super.visit(node, ordinal, parent); } };
@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); } };
@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(ViewExpanders.simpleContext(cluster)); return RelOptUtil.createProject(scan2, Mappings.asList(mapping.inverse())); } return scan; }
@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; }
final QuarkTile quarkTile) { RelNode rel = aggregateRelOptTable.toRel(RelOptUtil.getContext(scan.getCluster()));
public void rewriteRel(TableScan rel) { RelNode newRel = rel.getTable().toRel(toRelContext); if (!SqlTypeUtil.isFlat(rel.getRowType())) { final List<Pair<RexNode, String>> flattenedExpList = new ArrayList<>(); flattenInputs(rel.getRowType().getFieldList(), rexBuilder.makeRangeReference(newRel), flattenedExpList); newRel = relBuilder.push(newRel) .projectNamed(Pair.left(flattenedExpList), Pair.right(flattenedExpList), true) .build(); } setNewForOldRel(rel, newRel); }
public void rewriteRel(TableScan rel) { RelNode newRel = rel.getTable().toRel(toRelContext); if (!SqlTypeUtil.isFlat(rel.getRowType())) { final List<Pair<RexNode, String>> flattenedExpList = new ArrayList<>(); flattenInputs(rel.getRowType().getFieldList(), rexBuilder.makeRangeReference(newRel), flattenedExpList); newRel = relBuilder.push(newRel) .projectNamed(Pair.left(flattenedExpList), Pair.right(flattenedExpList), true) .build(); } setNewForOldRel(rel, newRel); }
public RelNode toRel(final RelOptTable table) { final RelNode scan = table.toRel(createToRelContext());
public RelNode toRel(final RelOptTable table) { final RelNode scan = table.toRel(createToRelContext());
RelOptTableImpl.create(table.getRelOptSchema(), aggregateTableRowType, tableEntry, rowCount); RelNode rel = aggregateRelOptTable.toRel(RelOptUtil.getContext(cluster));
tableEntry, rowCount); relBuilder.push(aggregateRelOptTable.toRel(ViewExpanders.simpleContext(cluster))); if (tileKey == null) { if (CalcitePrepareImpl.DEBUG) {