public RelNode toRel(RelOptTable table) { return table.toRel(createToRelContext()); }
public RelNode toRel(RelOptTable table) { return table.toRel(createToRelContext()); }
public void rewriteRel(TableAccessRel rel) { RelNode newRel = rel.getTable().toRel(toRelContext); setNewForOldRel(rel, newRel); }
public void rewriteRel(TableAccessRel rel) { RelNode newRel = rel.getTable().toRel(toRelContext); setNewForOldRel(rel, newRel); }
public void onMatch(RelOptRuleCall call) { final TableAccessRel oldRel = call.rel(0); RelNode newRel = oldRel.getTable().toRel( new RelOptTable.ToRelContext() { public RelOptCluster getCluster() { return oldRel.getCluster(); } public Prepare getPreparingStmt() { throw new UnsupportedOperationException(); } }); call.transformTo(newRel); } }
public void onMatch(RelOptRuleCall call) { final TableAccessRel oldRel = call.rel(0); RelNode newRel = oldRel.getTable().toRel( RelOptUtil.getContext(oldRel.getCluster())); call.transformTo(newRel); } }
/** Populates a materialization record, converting a table path * (essentially a list of strings, like ["hr", "sales"]) into a table object * that can be used in the planning process. */ void populate(Materialization materialization) { SqlParser parser = new SqlParser(materialization.sql); SqlNode node; try { node = parser.parseStmt(); } catch (SqlParseException e) { throw new RuntimeException("parse failed", e); } SqlToRelConverter sqlToRelConverter2 = getSqlToRelConverter(getSqlValidator(), catalogReader); materialization.queryRel = sqlToRelConverter2.convertQuery(node, true, true); RelOptTable table = catalogReader.getTable(materialization.materializedTable.path()); materialization.tableRel = table.toRel(sqlToRelConverter2.makeToRelContext()); } }
final RelNode tableRel; if (shouldConvertTableAccess) { tableRel = table.toRel( makeToRelContext()); } else {