use of org.apache.drill.exec.store.SchemaTreeProvider in project drill by apache.
the class BaseQueryRunner method applyDefaultSchema.
protected void applyDefaultSchema(String defaultSchema) throws ValidationException {
if (!Strings.isNullOrEmpty(defaultSchema)) {
SessionOptionManager options = webUserConnection.getSession().getOptions();
@SuppressWarnings("resource") SchemaTreeProvider schemaTreeProvider = new SchemaTreeProvider(workManager.getContext());
SchemaPlus rootSchema = schemaTreeProvider.createRootSchema(options);
webUserConnection.getSession().setDefaultSchemaPath(defaultSchema, rootSchema);
}
}
Aggregations