Enumerable<MetaTable> tables(final MetaSchema schema_) { final CalciteMetaSchema schema = (CalciteMetaSchema) schema_; return Linq4j.asEnumerable(schema.calciteSchema.getTableNames()) .select((Function1<String, MetaTable>) name -> { final Table table = schema.calciteSchema.getTable(name, true).getTable(); return new CalciteMetaTable(table, schema.tableCatalog, schema.tableSchem, name); }) .concat( Linq4j.asEnumerable( schema.calciteSchema.getTablesBasedOnNullaryFunctions() .entrySet()) .select(pair -> { final Table table = pair.getValue(); return new CalciteMetaTable(table, schema.tableCatalog, schema.tableSchem, pair.getKey()); })); }
Enumerable<MetaTable> tables(final MetaSchema schema_) { final CalciteMetaSchema schema = (CalciteMetaSchema) schema_; return Linq4j.asEnumerable(schema.calciteSchema.getTableNames()) .select((Function1<String, MetaTable>) name -> { final Table table = schema.calciteSchema.getTable(name, true).getTable(); return new CalciteMetaTable(table, schema.tableCatalog, schema.tableSchem, name); }) .concat( Linq4j.asEnumerable( schema.calciteSchema.getTablesBasedOnNullaryFunctions() .entrySet()) .select(pair -> { final Table table = pair.getValue(); return new CalciteMetaTable(table, schema.tableCatalog, schema.tableSchem, pair.getKey()); })); }
Enumerable<MetaTable> tables(final MetaSchema schema_) { final QuarkMetaSchema schema = (QuarkMetaSchema) schema_; return Linq4j.asEnumerable(schema.calciteSchema.getTableNames()) .select( new Function1<String, MetaTable>() { public MetaTable apply(String name) { final Table table = schema.calciteSchema.getTable(name, true).getTable(); return new QuarkMetaTable(table, schema.tableCatalog, schema.tableSchem, name); } }) .concat( Linq4j.asEnumerable( schema.calciteSchema.getTablesBasedOnNullaryFunctions() .entrySet()) .select( new Function1<Map.Entry<String, Table>, MetaTable>() { public MetaTable apply(Map.Entry<String, Table> pair) { final Table table = pair.getValue(); return new QuarkMetaTable(table, schema.tableCatalog, schema.tableSchem, pair.getKey()); } })); }