public class HivePartitionDescriptor extends AbstractPartitionDescriptor
locationSuperList, sublistsCreatedPARTITION_BATCH_SIZE| Constructor and Description |
|---|
HivePartitionDescriptor(PlannerSettings settings,
DrillScanRel scanRel,
DrillBuf managedBuffer,
String defaultPartitionValue) |
| 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> newPartitions,
boolean wasAllPartitionsPruned)
Create a new TableScan rel node, given the lists of new partitions or new files to SCAN.
|
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.
|
createTableScan, iterator, supportsMetadataCachePruningclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic HivePartitionDescriptor(PlannerSettings settings, DrillScanRel scanRel, DrillBuf managedBuffer, String defaultPartitionValue)
public int getPartitionHierarchyIndex(String partitionName)
PartitionDescriptorpartitionName - Partition namepublic boolean isPartitionName(String name)
PartitionDescriptorname - of Partitionpublic int getMaxHierarchyLevel()
PartitionDescriptorpublic org.apache.hadoop.fs.Path getBaseTableLocation()
public 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 Integer getIdIfValid(String name)
PartitionDescriptorname - The field name you want to compare to partition names.protected void createPartitionSublists()
AbstractPartitionDescriptorPartitionDescriptor.PARTITION_BATCH_SIZEcreatePartitionSublists in class AbstractPartitionDescriptorpublic org.apache.calcite.rel.core.TableScan createTableScan(List<PartitionLocation> newPartitions, boolean wasAllPartitionsPruned) throws Exception
PartitionDescriptorExceptionCopyright © 2021 The Apache Software Foundation. All rights reserved.