A schema is a tree of schema and tables. It's a component of the catalog
The root is called the RootSchema
select * from schema.table
For the schema definition in a model, see schemas -
In model is an (optional string, default map) that indicates the sub-type:
in model, apache/calcite/blob/master/core/src/main/java/org/apache/calcite/adapter/jdbc/JdbcSchema.java
{
"version": "1.0",
"defaultSchema": "FOODMART_CLONE",
"schemas": [{
"name": "FOODMART_CLONE",
"type": "custom",
"factory": "org.apache.calcite.adapter.jdbc.JdbcSchema$Factory",
"operand": {
"jdbcDriver": "com.mysql.jdbc.Driver",
"jdbcUrl": "jdbc:mysql://localhost/foodmart",
"jdbcUser": "foodmart",
"jdbcPassword": "foodmart"
}
}
]
}
apache/calcite/blob/master/core/src/main/java/org/apache/calcite/schema/Schema.java
public interface Schema {
Table getTable(String name);
Set<String> getTablesNames();
Schema getSubSchema(String name);
Set<String> getSubSchemaNames();
}
A BindableTableScan does not require a schema as context