@Evolving public interface SupportsPartitions
| Modifier and Type | Method and Description | 
|---|---|
Partition | 
addPartition(Partition partition)
Add a partition with specified name and properties to the table. 
 | 
boolean | 
dropPartition(java.lang.String partitionName)
Drop a partition with specified name. 
 | 
Partition | 
getPartition(java.lang.String partitionName)
Get a partition by partition name, you may get one of the following types of partitions:
 
    
IdentityPartition
   ListPartition
   RangePartition
 
 It depends on the Table.partitioning(). | 
java.lang.String[] | 
listPartitionNames()
List all partition names of the table 
 | 
Partition[] | 
listPartitions()
List all partitions 
 | 
default boolean | 
partitionExists(java.lang.String partitionName)
Check if a partition exists. 
 | 
default boolean | 
purgePartition(java.lang.String partitionName)
If the table supports purging, drop a partition with specified name and completely remove
 partition data by skipping a trash. 
 | 
java.lang.String[] listPartitionNames()
Partition[] listPartitions()
Partition getPartition(java.lang.String partitionName) throws NoSuchPartitionException
Table.partitioning(). A Java type conversion is required before
 getting the specific partition, for example:
 
   RangePartition rangePartition = (RangePartition) table.supportPartitions().getPartition("p20200321");
   Literal<?> upper = rangePartition.upper();
   Literal<?> lower = rangePartition.lower();
   ...
 partitionName - the name of the partitionNoSuchPartitionException - if the partition does not existdefault boolean partitionExists(java.lang.String partitionName)
partitionName - The name of the partition.Partition addPartition(Partition partition) throws PartitionAlreadyExistsException
partition - The partition to add.PartitionAlreadyExistsException - If the partition already exists.boolean dropPartition(java.lang.String partitionName)
partitionName - the name of the partitiondefault boolean purgePartition(java.lang.String partitionName)
                        throws java.lang.UnsupportedOperationException
UnsupportedOperationException is thrown.partitionName - The name of the partition.java.lang.UnsupportedOperationException - If partition purging is not supported.