@Override public Table getTable(String name) { Schema schema = getDefaultSchema(); if (schema != null) { try { return schema.getTable(name); } catch (RuntimeException e) { logger.warn("Failure while attempting to read table '{}' from JDBC source.", name, e); } } // no table was found. return null; }
public Schema getSubSchema(String name) { return schema.getSubSchema(name); }
@Override public Collection<org.apache.calcite.schema.Function> getFunctions(String name) { return schema.getFunctions(name); }
protected void addImplicitSubSchemaToBuilder( ImmutableSortedMap.Builder<String, CalciteSchema> builder) { ImmutableSortedMap<String, CalciteSchema> explicitSubSchemas = builder.build(); for (String schemaName : schema.getSubSchemaNames()) { if (explicitSubSchemas.containsKey(schemaName)) { // explicit subschema wins. continue; } Schema s = schema.getSubSchema(schemaName); if (s != null) { CalciteSchema calciteSchema = new SimpleCalciteSchema(this, s, schemaName); builder.put(schemaName, calciteSchema); } } }
@Override public Set<String> getFunctionNames() { return schema.getFunctionNames(); }
public Set<String> getTableNames() { return schema.getTableNames(); }
public Set<String> getTypeNames() { return schema.getTypeNames(); }
public RelProtoDataType getType(String name) { return schema.getType(name); }
protected void addImplicitTablesBasedOnNullaryFunctionsToBuilder( ImmutableSortedMap.Builder<String, Table> builder) { ImmutableSortedMap<String, Table> explicitTables = builder.build(); for (String s : schema.getFunctionNames()) { // explicit table wins. if (explicitTables.containsKey(s)) { continue; } for (Function function : schema.getFunctions(s)) { if (function instanceof TableMacro && function.getParameters().isEmpty()) { final Table table = ((TableMacro) function).apply(ImmutableList.of()); builder.put(s, table); } } } }
public Set<String> getSubSchemaNames() { return schema.getSubSchemaNames(); } }
@Override public Expression getExpression(SchemaPlus parentSchema, String name) { return schema.getExpression(parentSchema, name); }
public boolean isMutable() { return schema.isMutable(); }
public Schema getSubSchema(String name) { return schema.getSubSchema(name); }
@Override public Collection<org.apache.calcite.schema.Function> getFunctions(String name) { return schema.getFunctions(name); }
protected void addImplicitSubSchemaToBuilder( ImmutableSortedMap.Builder<String, CalciteSchema> builder) { ImmutableSortedMap<String, CalciteSchema> explicitSubSchemas = builder.build(); for (String schemaName : schema.getSubSchemaNames()) { if (explicitSubSchemas.containsKey(schemaName)) { // explicit subschema wins. continue; } Schema s = schema.getSubSchema(schemaName); if (s != null) { CalciteSchema calciteSchema = new SimpleCalciteSchema(this, s, schemaName); builder.put(schemaName, calciteSchema); } } }
public Set<String> getFunctionNames() { return schema.getFunctionNames(); }
@Override public Set<String> getTableNames() { return schema.getTableNames(); }
@Override public Set<String> getTypeNames() { return schema.getTypeNames(); }
@Override public RelProtoDataType getType(String name) { return schema.getType(name); }
protected void addImplicitTablesBasedOnNullaryFunctionsToBuilder( ImmutableSortedMap.Builder<String, Table> builder) { ImmutableSortedMap<String, Table> explicitTables = builder.build(); for (String s : schema.getFunctionNames()) { // explicit table wins. if (explicitTables.containsKey(s)) { continue; } for (Function function : schema.getFunctions(s)) { if (function instanceof TableMacro && function.getParameters().isEmpty()) { final Table table = ((TableMacro) function).apply(ImmutableList.of()); builder.put(s, table); } } } }