/** Creates a {@link org.apache.calcite.rel.core.TableScan} of the table * with a given name. * * <p>Throws if the table does not exist. * * <p>Returns this builder. * * @param tableNames Name of table (can optionally be qualified) */ public HiveSubQRemoveRelBuilder scan(Iterable<String> tableNames) { final List<String> names = ImmutableList.copyOf(tableNames); final RelOptTable relOptTable = relOptSchema.getTableForMember(names); if (relOptTable == null) { throw Static.RESOURCE.tableNotFound(Joiner.on(".").join(names)).ex(); } final RelNode scan = scanFactory.createScan(cluster, relOptTable); push(scan); return this; }
/** Creates a {@link org.apache.calcite.rel.core.TableScan} of the table * with a given name. * * <p>Throws if the table does not exist. * * <p>Returns this builder. * * @param tableNames Name of table (can optionally be qualified) */ public HiveSubQRemoveRelBuilder scan(Iterable<String> tableNames) { final List<String> names = ImmutableList.copyOf(tableNames); final RelOptTable relOptTable = relOptSchema.getTableForMember(names); if (relOptTable == null) { throw Static.RESOURCE.tableNotFound(Joiner.on(".").join(names)).ex(); } final RelNode scan = scanFactory.createScan(cluster, relOptTable); push(scan); return this; }
/** Creates a {@link TableScan} of the table * with a given name. * * <p>Throws if the table does not exist. * * <p>Returns this builder. * * @param tableNames Name of table (can optionally be qualified) */ public RelBuilder scan(Iterable<String> tableNames) { final List<String> names = ImmutableList.copyOf(tableNames); final RelOptTable relOptTable = relOptSchema.getTableForMember(names); if (relOptTable == null) { throw RESOURCE.tableNotFound(String.join(".", names)).ex(); } final RelNode scan = scanFactory.createScan(cluster, relOptTable); push(scan); return this; }
/** Creates a {@link TableScan} of the table * with a given name. * * <p>Throws if the table does not exist. * * <p>Returns this builder. * * @param tableNames Name of table (can optionally be qualified) */ public RelBuilder scan(Iterable<String> tableNames) { final List<String> names = ImmutableList.copyOf(tableNames); final RelOptTable relOptTable = relOptSchema.getTableForMember(names); if (relOptTable == null) { throw RESOURCE.tableNotFound(String.join(".", names)).ex(); } final RelNode scan = scanFactory.createScan(cluster, relOptTable); push(scan); rename(relOptTable.getRowType().getFieldNames()); return this; }