Class DruidSchemaCatalog

java.lang.Object
org.apache.druid.sql.calcite.schema.DruidSchemaCatalog

public class DruidSchemaCatalog extends Object
The Druid 'catalog', containing information about all Druid schemas which are available. This packages both the 'root level' Calcite SchemaPlus and a map of the NamedSchema which were used to populate it, keyed by NamedSchema.getSchemaName(). The rootSchema is a top level Calcite schema, which contains all NamedSchema.getSchema() and InformationSchema added as sub-schemas, and this class provides convenience methods to do things like fetch a specific SchemaPlus by name or list the set of all schemas available, and is used during query planning and execution. namedSchemas contains all NamedSchema, which should be everything except InformationSchema. These are used primarily for getResourceType(String, String), which given the name of a table or function that belongs to some NamedSchema, lookup the most appropriate value to use for Resource.getType() to use for authorization.
  • Constructor Details

    • DruidSchemaCatalog

      public DruidSchemaCatalog(org.apache.calcite.schema.SchemaPlus rootSchema, Map<String,NamedSchema> schemas)
  • Method Details