Class CapitalizingJdbcSchema

java.lang.Object
org.apache.drill.exec.store.AbstractSchema
org.apache.drill.exec.store.jdbc.CapitalizingJdbcSchema
All Implemented Interfaces:
AutoCloseable, org.apache.calcite.schema.Schema, SchemaPartitionExplorer

public class CapitalizingJdbcSchema extends AbstractSchema
  • Constructor Details

  • Method Details

    • getTypeName

      public String getTypeName()
      Description copied from class: AbstractSchema
      Returns string describing schema type which shows where the schema came from. Good practice here is to return json type name of storage plugin's config.
      Specified by:
      getTypeName in class AbstractSchema
      Returns:
      schema type name
    • getFunctions

      public Collection<org.apache.calcite.schema.Function> getFunctions(String name)
      Description copied from class: AbstractSchema
      For the given table names returns list of acceptable table functions which are common for all Drill schemas. When overriding this method, parent functions must be included first to be evaluated first. If not included, parent functions won't be taken into account when creating table instance.
      Specified by:
      getFunctions in interface org.apache.calcite.schema.Schema
      Overrides:
      getFunctions in class AbstractSchema
      Parameters:
      name - table name
      Returns:
      list of table functions
    • getFunctionNames

      public Set<String> getFunctionNames()
      Specified by:
      getFunctionNames in interface org.apache.calcite.schema.Schema
      Overrides:
      getFunctionNames in class AbstractSchema
    • getSubSchema

      public CapitalizingJdbcSchema getSubSchema(String name)
      Specified by:
      getSubSchema in interface org.apache.calcite.schema.Schema
      Overrides:
      getSubSchema in class AbstractSchema
    • getSubSchemaNames

      public Set<String> getSubSchemaNames()
      Specified by:
      getSubSchemaNames in interface org.apache.calcite.schema.Schema
      Overrides:
      getSubSchemaNames in class AbstractSchema
    • getTableNames

      public Set<String> getTableNames()
      Specified by:
      getTableNames in interface org.apache.calcite.schema.Schema
      Overrides:
      getTableNames in class AbstractSchema
    • createNewTable

      public CreateTableEntry createNewTable(String tableName, List<String> partitionColumns, StorageStrategy strategy)
      Description copied from class: AbstractSchema
      Creates table entry using table name, list of partition columns and storage strategy used to create table folder and files
      Overrides:
      createNewTable in class AbstractSchema
      Parameters:
      tableName - : new table name.
      partitionColumns - : list of partition columns. Empty list if there is no partition columns.
      strategy - : storage strategy used to create table folder and files
      Returns:
      create table entry
    • modifyTable

      public ModifyTableEntry modifyTable(String tableName)
      Description copied from class: AbstractSchema
      Returns table entry using table name to insert records into the table.
      Overrides:
      modifyTable in class AbstractSchema
      Parameters:
      tableName - : new table name.
      Returns:
      insert table entry
    • dropTable

      public void dropTable(String tableName)
      Overrides:
      dropTable in class AbstractSchema
    • isMutable

      public boolean isMutable()
      Specified by:
      isMutable in interface org.apache.calcite.schema.Schema
      Overrides:
      isMutable in class AbstractSchema
    • getTable

      public org.apache.calcite.schema.Table getTable(String name)
      Specified by:
      getTable in interface org.apache.calcite.schema.Schema
      Overrides:
      getTable in class AbstractSchema
    • areTableNamesCaseSensitive

      public boolean areTableNamesCaseSensitive()
      Description copied from class: AbstractSchema
      Indicates if table names in schema are case sensitive. By default they are. If schema implementation claims its table names are case insensitive, it is responsible for making case insensitive look up by table name.
      Overrides:
      areTableNamesCaseSensitive in class AbstractSchema
      Returns:
      true if table names are case sensitive
    • getDefaultSchema

      public CapitalizingJdbcSchema getDefaultSchema()
      Description copied from class: AbstractSchema
      The schema can be a top level schema which doesn't have its own tables, but refers to one of the default sub schemas for table look up.

      Default implementation returns itself.

      Ex. "dfs" schema refers to the tables in "default" workspace when querying for tables in "dfs" schema.

      Overrides:
      getDefaultSchema in class AbstractSchema
      Returns:
      Return the default schema where tables are created or retrieved from.