This is an automated email from the ASF dual-hosted git repository. yiguolei pushed a commit to branch branch-2.1 in repository https://gitbox.apache.org/repos/asf/doris.git
commit 123a187c2397cab78c9144c8ad1248ed021583f2 Author: Guangdong Liu <[email protected]> AuthorDate: Mon Jan 29 21:55:26 2024 +0800 [regression test](schema change) add case for modify partition info (#30338) --- .../suites/schema_change_p0/test_partition.groovy | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/regression-test/suites/schema_change_p0/test_partition.groovy b/regression-test/suites/schema_change_p0/test_partition.groovy index d3d00d9feed..ef9e3655302 100644 --- a/regression-test/suites/schema_change_p0/test_partition.groovy +++ b/regression-test/suites/schema_change_p0/test_partition.groovy @@ -64,5 +64,34 @@ suite("test_partition") { sql """ALTER TABLE ${tblName} DROP PARTITION new_p1;""" order_qt_sql_2 """SELECT * from ${tblName};""" checkPartition(tblName); + + //modify partition storage_medium + sql """ALTER TABLE ${tblName} modify PARTITION old_p1 set("storage_medium"="HDD");""" + + test { + sql """show partitions from ${tblName} where partitionName="old_p1";""" + check { result, ex, startTime, endTime -> + assertEquals("HDD", result[0][10]) + } + } + + //modify partition storage_cooldown_time + sql """ALTER TABLE ${tblName} modify PARTITION old_p1 set("storage_medium"="SSD","storage_cooldown_time"="9999-12-31 23:59:59");""" + + test { + sql """show partitions from ${tblName} where partitionName="old_p1";""" + check { result, ex, startTime, endTime -> + assertEquals("SSD", result[0][10]) + assertEquals("9999-12-31 23:59:59", result[0][11]) + } + } + + //modify partition in_memory + test { + sql """ALTER TABLE ${tblName} modify PARTITION old_p1 set("in_memory"="true");""" + exception "Not support set 'in_memory'='true' now!" + } + sql """DROP TABLE IF EXISTS ${tblName} FORCE; """ + } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
