public class HivePartitionDescriptor extends AbstractPartitionDescriptor
locationSuperList, sublistsCreated
PARTITION_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, supportsMetadataCachePruning
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public HivePartitionDescriptor(PlannerSettings settings, DrillScanRel scanRel, DrillBuf managedBuffer, String defaultPartitionValue)
public int getPartitionHierarchyIndex(String partitionName)
PartitionDescriptor
partitionName
- Partition namepublic boolean isPartitionName(String name)
PartitionDescriptor
name
- of Partitionpublic int getMaxHierarchyLevel()
PartitionDescriptor
public org.apache.hadoop.fs.Path getBaseTableLocation()
public void populatePartitionVectors(ValueVector[] vectors, List<PartitionLocation> partitions, BitSet partitionColumnBitSet, Map<Integer,String> fieldNameMap)
PartitionDescriptor
vectors
- - 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)
PartitionDescriptor
column
- - column whose type should be determinedpublic Integer getIdIfValid(String name)
PartitionDescriptor
name
- The field name you want to compare to partition names.protected void createPartitionSublists()
AbstractPartitionDescriptor
PartitionDescriptor.PARTITION_BATCH_SIZE
createPartitionSublists
in class AbstractPartitionDescriptor
public org.apache.calcite.rel.core.TableScan createTableScan(List<PartitionLocation> newPartitions, boolean wasAllPartitionsPruned) throws Exception
PartitionDescriptor
Exception
Copyright © 1970 The Apache Software Foundation. All rights reserved.