@Override public ConnectionFactory with(String property, Object value) { return new MapConnectionFactory( FlatLists.append(this.map, property, value.toString()), postProcessors); }
public ConnectionFactory with(String property, Object value) { return new MapConnectionFactory( FlatLists.append(this.map, property, value.toString()), postProcessors); }
/** Adds a hook and a handler for that hook. Calcite will create a thread * hook (by calling {@link Hook#addThread(Consumer)}) * just before running the query, and remove the hook afterwards. */ public <T> Sql withHook(Hook hook, Consumer<T> handler) { return new Sql(sql, preProgram, hepPlanner, FlatLists.append(hooks, hook, handler), transforms); }
/** Adds a hook and a handler for that hook. Calcite will create a thread * hook (by calling {@link Hook#addThread(Consumer)}) * just before running the query, and remove the hook afterwards. */ public <T> Sql withHook(Hook hook, Consumer<T> handler) { return new Sql(sql, preProgram, hepPlanner, FlatLists.append(hooks, hook, handler), transforms); }
@Override protected Map<String, Table> getTableMap() { // Mine the EMPS table and add it under another name e.g. ELVIS final Map<String, Table> tableMap = super.getTableMap(); final Table table = tableMap.get("emps"); final String tableName = (String) operand.get("tableName"); return FlatLists.append(tableMap, tableName, table); }
/** Adds a transform that will be applied to {@link #tester} * just before running the query. */ private Sql withTransform(Function<Tester, Tester> transform) { return new Sql(sql, preProgram, hepPlanner, hooks, FlatLists.append(transforms, transform)); }
@Override protected Map<String, Table> getTableMap() { // Mine the EMPS table and add it under another name e.g. ELVIS final Map<String, Table> tableMap = super.getTableMap(); final Table table = tableMap.get("emps"); final String tableName = (String) operand.get("tableName"); return FlatLists.append(tableMap, tableName, table); }
/** Adds a transform that will be applied to {@link #tester} * just before running the query. */ private Sql withTransform(Function<Tester, Tester> transform) { return new Sql(sql, preProgram, hepPlanner, hooks, FlatLists.append(transforms, transform)); }
public ConnectionFactory with(String property, Object value) { return new MapConnectionFactory( FlatLists.append(this.map, property, value.toString()), postProcessors); }
Sql optimize(final RuleSet ruleSet, final RelOptPlanner relOptPlanner) { return new Sql(schema, sql, dialect, config, FlatLists.append(transforms, r -> { Program program = Programs.of(ruleSet); return program.run(relOptPlanner, r, r.getTraitSet(), ImmutableList.of(), ImmutableList.of()); })); }
Sql optimize(final RuleSet ruleSet, final RelOptPlanner relOptPlanner) { return new Sql(schema, sql, dialect, config, FlatLists.append(transforms, r -> { Program program = Programs.of(ruleSet); return program.run(relOptPlanner, r, r.getTraitSet(), ImmutableList.of(), ImmutableList.of()); })); }