You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudberry.apache.org by ma...@apache.org on 2025/01/07 06:21:47 UTC

(cloudberry) 06/11: Add test case for reloptions when adding child partition w/ different AM than parent

This is an automated email from the ASF dual-hosted git repository.

maxyang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudberry.git

commit df53aab6ba0b034c57eee85f056bba060cd1f9cb
Author: xuqi.wxq <xu...@alibaba-inc.com>
AuthorDate: Tue Sep 27 16:19:25 2022 +0800

    Add test case for reloptions when adding child partition w/ different AM than parent
    
    Was fixed in 3e943c17edf7. Now adding a test and adjusting a comment.
---
 src/test/regress/expected/partition_storage.out | 19 +++++++++++++++++++
 src/test/regress/sql/partition_storage.sql      | 20 ++++++++++++++++++++
 2 files changed, 39 insertions(+)

diff --git a/src/test/regress/expected/partition_storage.out b/src/test/regress/expected/partition_storage.out
index 88eb1c59db..4b26601f57 100644
--- a/src/test/regress/expected/partition_storage.out
+++ b/src/test/regress/expected/partition_storage.out
@@ -787,3 +787,22 @@ Options: compresstype=zlib, compresslevel=1
  alter table pt_co_tab_rng add default partition dft;
 -- Split default partition
  alter table pt_co_tab_rng split default partition start(45) end(60) into (partition dft, partition two);
+-- Add partition with different table am
+ SET gp_default_storage_options = 'blocksize=32768,compresstype=zstd,compresslevel=9';
+ SET default_table_access_method TO ao_column;
+ CREATE TABLE pt_co_to_heap
+ (
+    col1 int,
+    col2 decimal,
+    col3 text,
+    col4 bool
+ )
+ distributed by (col1)
+ partition by list(col2)
+ (
+    partition part1 values(1,2,3)
+ );
+ ALTER TABLE pt_co_to_heap ADD PARTITION p4 values(4) WITH (appendonly=false);
+ DROP TABLE pt_co_to_heap;
+ SET gp_default_storage_options TO DEFAULT;
+ SET default_table_access_method TO DEFAULT;
diff --git a/src/test/regress/sql/partition_storage.sql b/src/test/regress/sql/partition_storage.sql
index f178956fec..fa3b0716cd 100644
--- a/src/test/regress/sql/partition_storage.sql
+++ b/src/test/regress/sql/partition_storage.sql
@@ -472,3 +472,23 @@ drop table if exists co_can cascade;
 
 -- Split default partition
  alter table pt_co_tab_rng split default partition start(45) end(60) into (partition dft, partition two);
+
+-- Add partition with different table am
+ SET gp_default_storage_options = 'blocksize=32768,compresstype=zstd,compresslevel=9';
+ SET default_table_access_method TO ao_column;
+ CREATE TABLE pt_co_to_heap
+ (
+    col1 int,
+    col2 decimal,
+    col3 text,
+    col4 bool
+ )
+ distributed by (col1)
+ partition by list(col2)
+ (
+    partition part1 values(1,2,3)
+ );
+ ALTER TABLE pt_co_to_heap ADD PARTITION p4 values(4) WITH (appendonly=false);
+ DROP TABLE pt_co_to_heap;
+ SET gp_default_storage_options TO DEFAULT;
+ SET default_table_access_method TO DEFAULT;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: commits-help@cloudberry.apache.org