felixwluo commented on code in PR #37114: URL: https://github.com/apache/doris/pull/37114#discussion_r1682241620
########## regression-test/suites/alter_p0/test_alter_add_multi_partition.groovy: ########## @@ -0,0 +1,169 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +suite("test_alter_add_multi_partition") { + sql "DROP TABLE IF EXISTS add_multi_partition FORCE" + sql """ + CREATE TABLE IF NOT EXISTS add_multi_partition + ( + `user_id` LARGEINT NOT NULL, + `date` DATE NOT NULL, + `city` VARCHAR(20), + `age` SMALLINT, + `max_dwell_time` INT MAX DEFAULT "0", + `min_dwell_time` INT MIN DEFAULT "99999" + ) + ENGINE=OLAP + AGGREGATE KEY(`user_id`, `date`, `city`, `age`) + PARTITION BY RANGE(`date`) + ( + PARTITION `p2018` VALUES [("2018-01-01"), ("2019-01-01")) + ) + DISTRIBUTED BY HASH(`user_id`) BUCKETS 3 + PROPERTIES + ( + "replication_num" = "1" + ); + """ + List<List<Object>> result1 = sql "show partitions from add_multi_partition;" + assertEquals(result1.size(), 1) + sql "ALTER TABLE add_multi_partition ADD PARTITIONS FROM ('2019-01-01') TO ('2025-01-01') INTERVAL 1 YEAR;" Review Comment: added 0229 partition. No problem -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org