You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudberry.apache.org by yj...@apache.org on 2025/01/06 08:39:30 UTC
(cloudberry) 02/20: Remove merge fixme from transformGpPartitionDefinition()
This is an automated email from the ASF dual-hosted git repository.
yjhjstz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudberry.git
commit 874ec50997d1119a6a6831117d59af3aa2766c01
Author: Ashwin Agrawal <aa...@vmware.com>
AuthorDate: Tue Feb 21 12:46:09 2023 -0800
Remove merge fixme from transformGpPartitionDefinition()
Currently, partition definition element can have mix of partition
definitions and also COLUMN ENCODING clauses within it.
For example:
CREATE TABLE foo (a1 int, a2 char(5)) using ao_row
partition by range (a1) (
start(1) end(5) every(1), --> partition definition
COLUMN a1 ENCODING (compresstype=zstd) --> column encoding
);
Due to this when GpPartitionDefinition has single list of partDefElems
which contains partition definitions and also column encodings. Fixme
was to evaluate if current grammer can be optimized to generate
separate lists and eliminate the need for separating these later in
transformGpPartitionDefinition(). So, not essentially anything to fix,
just optimize.
After looking into the details - seems not straightforward without
modifing the grammer which will be breaking change. Also, don't see
much performance benefit either from the change as current code is
looping over partDefElems to transform, so not much extra cost added
from having them together. Also, we don't expect to have huge number
of elements in this list to overpower the cost from actually creating
these many partition tables.
Reviewed-by: Alexandra Wang <wa...@vmware.com>
Reviewed-by: Huansong Fu <fu...@gmail.com>
---
src/backend/parser/parse_partition_gp.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/src/backend/parser/parse_partition_gp.c b/src/backend/parser/parse_partition_gp.c
index 6d21d79fa8..c030a3cc85 100644
--- a/src/backend/parser/parse_partition_gp.c
+++ b/src/backend/parser/parse_partition_gp.c
@@ -1463,10 +1463,6 @@ generatePartitions(Oid parentrelid, GpPartitionDefinition *gpPartSpec,
parent_tblenc = lappend(parent_tblenc, lfirst(lc));
}
- /*
- * GPDB_12_MERGE_FIXME: can we optimize grammar to create separate lists
- * for elems and encoding in encClauses.
- */
foreach(lc, gpPartSpec->partDefElems)
{
Node *n = lfirst(lc);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: commits-help@cloudberry.apache.org