Class TablesMetadataMapper.PartitionMapper
java.lang.Object
org.apache.drill.metastore.rdbms.transform.AbstractMetadataMapper<TableMetadataUnit,R>
org.apache.drill.metastore.rdbms.components.tables.TablesMetadataMapper<PartitionsRecord>
org.apache.drill.metastore.rdbms.components.tables.TablesMetadataMapper.PartitionMapper
- All Implemented Interfaces:
MetadataMapper<TableMetadataUnit,
PartitionsRecord>
- Enclosing class:
- TablesMetadataMapper<R extends org.jooq.Record>
public static class TablesMetadataMapper.PartitionMapper
extends TablesMetadataMapper<PartitionsRecord>
TablesMetadataMapper
implementation for Tables.PARTITIONS
table.-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.drill.metastore.rdbms.components.tables.TablesMetadataMapper
TablesMetadataMapper.FileMapper, TablesMetadataMapper.PartitionMapper, TablesMetadataMapper.RowGroupMapper, TablesMetadataMapper.SegmentMapper, TablesMetadataMapper.TableMapper
-
Field Summary
Fields inherited from class org.apache.drill.metastore.rdbms.components.tables.TablesMetadataMapper
COMPONENT_PARTITION_KEY, TABLE_PARTITION_KEY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected Map<MetastoreColumn,
org.jooq.Field<?>> protected RdbmsFilterExpressionVisitor
get()
protected Function<TableMetadataUnit,
List<String>> org.jooq.Table<PartitionsRecord>
table()
protected List<org.jooq.Condition>
toConditions
(List<String> values) Creates JOOQ conditions based on given list of partition values.toRecord
(TableMetadataUnit unit) Converts Metastore component metadata unit into RDBMS table record.toUnit
(org.jooq.Record record) Converts RDBMS table record into Metastore component metadata unit.Methods inherited from class org.apache.drill.metastore.rdbms.components.tables.TablesMetadataMapper
emptyUnit, toDeleteConditions
Methods inherited from class org.apache.drill.metastore.rdbms.transform.AbstractMetadataMapper
toCondition, toFields
-
Constructor Details
-
PartitionMapper
public PartitionMapper()
-
-
Method Details
-
get
-
table
- Returns:
- RDBMS table instance
-
toUnit
Description copied from interface:MetadataMapper
Converts RDBMS table record into Metastore component metadata unit.- Parameters:
record
- RDBMS table record- Returns:
- Metastore component metadata unit instance
-
toRecord
Description copied from interface:MetadataMapper
Converts Metastore component metadata unit into RDBMS table record.- Parameters:
unit
- Metastore component metadata unit- Returns:
- RDBMS table record instance
-
fieldMapper
- Specified by:
fieldMapper
in classAbstractMetadataMapper<TableMetadataUnit,
PartitionsRecord> - Returns:
- mapper specific field mapper
-
filterVisitor
- Specified by:
filterVisitor
in classAbstractMetadataMapper<TableMetadataUnit,
PartitionsRecord> - Returns:
- mapper specific filter visitor
-
partitionKey
- Specified by:
partitionKey
in classTablesMetadataMapper<PartitionsRecord>
- Returns:
- function to determine partition key for specific table
-
toConditions
Description copied from class:TablesMetadataMapper
Creates JOOQ conditions based on given list of partition values. Matching is order based.- Specified by:
toConditions
in classTablesMetadataMapper<PartitionsRecord>
- Parameters:
values
- partition values- Returns:
- list of JOOQ conditions
-