@Override protected List<LatticeEntry> getLattices() { return Schemas.getLatticeEntries(schema); } }
@Override protected List<LatticeEntry> getLattices() { return Schemas.getLatticeEntries(schema); } }
@Override protected List<LatticeEntry> getLattices() { return Schemas.getLatticeEntries(schema); } }
/** Returns the lattices defined in a schema. * * @param schema Schema */ public static List<Lattice> getLattices(CalciteSchema schema) { final List<CalciteSchema.LatticeEntry> list = getLatticeEntries(schema); return Lists.transform(list, CalciteSchema.LatticeEntry::getLattice); }
/** Returns the lattices defined in a schema. * * @param schema Schema */ public static List<Lattice> getLattices(CalciteSchema schema) { final List<CalciteSchema.LatticeEntry> list = getLatticeEntries(schema); return Lists.transform(list, CalciteSchema.LatticeEntry::getLattice); }
/** Returns the star tables defined in a schema. * * @param schema Schema */ public static List<CalciteSchema.TableEntry> getStarTables( CalciteSchema schema) { final List<CalciteSchema.LatticeEntry> list = getLatticeEntries(schema); return Lists.transform(list, entry -> { final CalciteSchema.TableEntry starTable = Objects.requireNonNull(entry).getStarTable(); assert starTable.getTable().getJdbcTableType() == Schema.TableType.STAR; return entry.getStarTable(); }); }
/** Returns the star tables defined in a schema. * * @param schema Schema */ public static List<CalciteSchema.TableEntry> getStarTables( CalciteSchema schema) { final List<CalciteSchema.LatticeEntry> list = getLatticeEntries(schema); return Lists.transform(list, entry -> { final CalciteSchema.TableEntry starTable = Objects.requireNonNull(entry).getStarTable(); assert starTable.getTable().getJdbcTableType() == Schema.TableType.STAR; return entry.getStarTable(); }); }
/** Called after the constructor has completed and the model has been * loaded. */ void init() { final MaterializationService service = MaterializationService.instance(); for (CalciteSchema.LatticeEntry e : Schemas.getLatticeEntries(rootSchema)) { final Lattice lattice = e.getLattice(); for (Lattice.Tile tile : lattice.computeTiles()) { service.defineTile(lattice, tile.bitSet(), tile.measures, e.schema, true, true); } } }
/** Called after the constructor has completed and the model has been * loaded. */ void init() { final MaterializationService service = MaterializationService.instance(); for (CalciteSchema.LatticeEntry e : Schemas.getLatticeEntries(rootSchema)) { final Lattice lattice = e.getLattice(); for (Lattice.Tile tile : lattice.computeTiles()) { service.defineTile(lattice, tile.bitSet(), tile.measures, e.schema, true, true); } } }
private void populateMaterializationsAndLattice( QuarkMaterializeCluster.RelOptPlannerHolder plannerHolder, CalciteSchema rootSchema) { if (materializations == null) { materializations = MaterializationService.instance().query(rootSchema); } Materializer materializer = new Materializer(materializations); materializer.populateMaterializations(context.getPrepareContext(), plannerHolder); List<CalciteSchema.LatticeEntry> lattices = Schemas.getLatticeEntries(rootSchema); for (CalciteSchema.LatticeEntry lattice : lattices) { final CalciteSchema.TableEntry starTable = lattice.getStarTable(); final JavaTypeFactory typeFactory = context.getTypeFactory(); final RelOptTableImpl starRelOptTable = RelOptTableImpl.create(catalogReader, starTable.getTable().getRowType(typeFactory), starTable, null); plannerHolder.getPlanner().addLattice( new RelOptLattice(lattice.getLattice(), starRelOptTable)); } } }
for (CalciteSchema.LatticeEntry e : Schemas.getLatticeEntries( CalciteSchema.from(queryContext.getRootSchema()))) { final Lattice lattice = e.getLattice();