partition#
- swordfish.function.partition()#
Select one or more partitions from a partitioned table. It can only be used in the where clause of a SQL statement. This function makes it convenient to select specific partitions for HASH, LIST and RANGE partitions.
- Parameters:
partitionCol (Constant) – A STRING indicating the partitioning column. For COMPO partitions, specify either of the partitioning columns.
keys (Constant) –
A scalar or vector without null values, indicating the partition(s) to select. Please refer to the following table about how to specify keys for each partition scheme:
Partition Scheme
How to Specify keys
VALUE
The associated element(s) in the partitioning vector
RANGE
The index of the associated partition(s), starting from 0
HASH
Hash modulus(moduli) of the partitioning column
LIST
The index of the associated partition(s), starting from 0
Note
The partitions specified by keys must be within the partition range of the partitioned table, otherwise an error would occur indicating the specified keys are out of range.