0002_additional_changes.patch
text/x-patch
Filename: 0002_additional_changes.patch
Type: text/x-patch
Part: 0
Message:
Re: [POC] hash partitioning
Patch
Format: unified
| File | + | − |
|---|---|---|
| src/backend/catalog/partition.c | 8 | 8 |
diff --git a/src/backend/catalog/partition.c b/src/backend/catalog/partition.c
index 6bd4aa8..89c3b0a 100644
--- a/src/backend/catalog/partition.c
+++ b/src/backend/catalog/partition.c
@@ -59,9 +59,12 @@
* In the case of range partitioning, ndatums will typically be far less than
* 2 * nparts, because a partition's upper bound and the next partition's lower
* bound are the same in most common cases, and we only store one of them.
- * In the case of hash partitioning, datums is a 2-D array, stores modulus and
- * remainder values at datums[x][0] and datums[x][1] respectively for each
- * partition in the ascending order.
+ * In case of hash partitioning, ndatums be same as the number of partitions.
+ *
+ * For range and list partitioned tables, datums is an array of datum-tuples
+ * with key->partnatts datums each.
+ * For hash partitioned tables, it is an array of datum-tuples with 2 datums,
+ * modulus and remainder, corresponding to a given partition.
*
* In the case of list partitioning, the indexes array stores one entry for
* every datum, which is the index of the partition that accepts a given datum.
@@ -87,12 +90,9 @@ typedef struct PartitionBoundInfoData
{
char strategy; /* hash, list or range bounds? */
int ndatums; /* Length of the datums following array */
- Datum **datums; /* For hash partitioned table, array of modulus
- * and remainder. For range and list partitioned
- * table, array of datum-tuples with
- * key->partnatts datums each */
+ Datum **datums;
RangeDatumContent **content;/* what's contained in each range bound datum?
- * (see the above enum); NULL for has and list
+ * (see the above enum); NULL for hash and list
* partitioned tables */
int *indexes; /* Partition indexes */
bool has_null; /* Is there a null-accepting partition? false