public class ParquetPartitionDescriptor extends AbstractPartitionDescriptor
locationSuperList, sublistsCreatedPARTITION_BATCH_SIZE| Constructor and Description |
|---|
ParquetPartitionDescriptor(PlannerSettings settings,
DrillScanRel scanRel) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
createPartitionSublists()
Create sublists of the partition locations, each sublist of size
at most
PartitionDescriptor.PARTITION_BATCH_SIZE |
org.apache.calcite.rel.core.TableScan |
createTableScan(List<PartitionLocation> newPartitionLocation,
boolean wasAllPartitionsPruned)
Create a new TableScan rel node, given the lists of new partitions or new files to SCAN.
|
org.apache.calcite.rel.core.TableScan |
createTableScan(List<PartitionLocation> newPartitionLocation,
org.apache.hadoop.fs.Path cacheFileRoot,
boolean wasAllPartitionsPruned,
MetadataContext metaContext)
Create a new TableScan rel node, given the lists of new partitions or new files to scan and a path
to a metadata cache file
|
org.apache.hadoop.fs.Path |
getBaseTableLocation() |
Integer |
getIdIfValid(String name)
Check to see if the name is a partition name.
|
int |
getMaxHierarchyLevel()
Maximum level of partition nesting/ hierarchy supported
|
int |
getPartitionHierarchyIndex(String partitionName)
Get the hierarchy index of the given partition
For eg: if we have the partition laid out as follows
1997/q1/jan
then getPartitionHierarchyIndex("jan") => 2
|
TypeProtos.MajorType |
getVectorType(SchemaPath column,
PlannerSettings plannerSettings)
Method returns the Major type associated with the given column
|
boolean |
isPartitionName(String name)
Given a column name return boolean to indicate if its a partition column or not
|
void |
populatePartitionVectors(ValueVector[] vectors,
List<PartitionLocation> partitions,
BitSet partitionColumnBitSet,
Map<Integer,String> fieldNameMap)
Creates an in memory representation of all the partitions.
|
iterator, supportsMetadataCachePruningclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic ParquetPartitionDescriptor(PlannerSettings settings, DrillScanRel scanRel)
public int getPartitionHierarchyIndex(String partitionName)
PartitionDescriptorpartitionName - Partition namepublic boolean isPartitionName(String name)
PartitionDescriptorname - of Partitionpublic Integer getIdIfValid(String name)
PartitionDescriptorname - The field name you want to compare to partition names.public int getMaxHierarchyLevel()
PartitionDescriptorpublic void populatePartitionVectors(ValueVector[] vectors, List<PartitionLocation> partitions, BitSet partitionColumnBitSet, Map<Integer,String> fieldNameMap)
PartitionDescriptorvectors - - Array of vectors in the container that need to be populatedpartitions - - List of all the partitions that exist in the tablepartitionColumnBitSet - - Partition columns selected in the queryfieldNameMap - - Maps field ordinal to the field namepublic TypeProtos.MajorType getVectorType(SchemaPath column, PlannerSettings plannerSettings)
PartitionDescriptorcolumn - - column whose type should be determinedpublic org.apache.hadoop.fs.Path getBaseTableLocation()
public org.apache.calcite.rel.core.TableScan createTableScan(List<PartitionLocation> newPartitionLocation, org.apache.hadoop.fs.Path cacheFileRoot, boolean wasAllPartitionsPruned, MetadataContext metaContext) throws Exception
PartitionDescriptorcreateTableScan in interface PartitionDescriptorcreateTableScan in class AbstractPartitionDescriptorExceptionpublic org.apache.calcite.rel.core.TableScan createTableScan(List<PartitionLocation> newPartitionLocation, boolean wasAllPartitionsPruned) throws Exception
PartitionDescriptorExceptionprotected void createPartitionSublists()
AbstractPartitionDescriptorPartitionDescriptor.PARTITION_BATCH_SIZEcreatePartitionSublists in class AbstractPartitionDescriptorCopyright © 2021 The Apache Software Foundation. All rights reserved.