Class AbstractMetadataMapper<U,R extends org.jooq.Record>

java.lang.Object
org.apache.drill.metastore.rdbms.transform.AbstractMetadataMapper<U,R>
Type Parameters:
U - Metastore component metadata type
R - RDBMS table record type
All Implemented Interfaces:
MetadataMapper<U,R>
Direct Known Subclasses:
TablesMetadataMapper

public abstract class AbstractMetadataMapper<U,R extends org.jooq.Record> extends Object implements MetadataMapper<U,R>
Abstract implementation of MetadataMapper interface which contains common code for all Metastore component metadata and RDBMS table types.
  • Constructor Details

    • AbstractMetadataMapper

      public AbstractMetadataMapper()
  • Method Details

    • toFields

      public List<org.jooq.Field<?>> toFields(List<MetastoreColumn> columns)
      Description copied from interface: MetadataMapper
      Matches given list of Metastore columns to the available RDBMS table columns.
      Specified by:
      toFields in interface MetadataMapper<U,R extends org.jooq.Record>
      Parameters:
      columns - list of Metastore columns
      Returns:
      list of RDBMS table fields
    • toCondition

      public org.jooq.Condition toCondition(FilterExpression filter)
      Description copied from interface: MetadataMapper
      Converts Metastore filter expression into JOOQ condition instance which will be used as where clause in SQL query.
      Specified by:
      toCondition in interface MetadataMapper<U,R extends org.jooq.Record>
      Parameters:
      filter - filter expression
      Returns:
      JOOQ condition instance
    • fieldMapper

      protected abstract Map<MetastoreColumn,org.jooq.Field<?>> fieldMapper()
      Returns:
      mapper specific field mapper
    • filterVisitor

      protected abstract RdbmsFilterExpressionVisitor filterVisitor()
      Returns:
      mapper specific filter visitor