public Connection apply(Connection connection) throws SQLException {
if (schema != null) {
CalciteConnection con = connection.unwrap(CalciteConnection.class);
SchemaPlus rootSchema = con.getRootSchema();
rootSchema.add(name, schema);
}
connection.setSchema(name);
return connection;
}
|