amorynan commented on code in PR #21417: URL: https://github.com/apache/doris/pull/21417#discussion_r1250034126
########## regression-test/suites/query_p0/join/test_collect_list_distinct.groovy: ########## @@ -0,0 +1,116 @@ +// 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_collect_list_distinct") { + def table1 = "bu_delivery" + def table2 = "bu_delivery_product" + def table3 = "bu_trans_transfer" + + sql "DROP TABLE IF EXISTS ${table1}" + sql "DROP TABLE IF EXISTS ${table2}" + sql "DROP TABLE IF EXISTS ${table3}" + + sql """ + CREATE TABLE `${table1}` ( + `delivery_id` bigint(20) NOT NULL, + `val_status` varchar(6) NULL, + `delivery_type` int(11) NULL, + `catalog_name` varchar(96) NULL + ) ENGINE=OLAP + UNIQUE KEY(`delivery_id`) + COMMENT 'OLAP' + DISTRIBUTED BY HASH(`delivery_id`) BUCKETS 9 + PROPERTIES ( + "replication_allocation" = "tag.location.default: 1", + "storage_format" = "V2", + "light_schema_change" = "true", + "disable_auto_compaction" = "false", + "enable_single_replica_compaction" = "false" + ); + """ + sql """ + CREATE TABLE `${table2}` ( + `delivery_product_id` bigint(20) NOT NULL, + `delivery_id` bigint(20) NULL, + `nc_num` text NULL, + `material_qty` text NULL, + `catalog_name` text NULL + ) ENGINE=OLAP + UNIQUE KEY(`delivery_product_id`) + COMMENT 'OLAP' + DISTRIBUTED BY HASH(`delivery_product_id`) BUCKETS 9 + PROPERTIES ( + "replication_allocation" = "tag.location.default: 1", + "storage_format" = "V2", + "light_schema_change" = "true", + "disable_auto_compaction" = "false", + "enable_single_replica_compaction" = "false" + ); + """ + sql """ + CREATE TABLE `${table3}` ( + `transfer_id` bigint(20) NOT NULL, + `delivery_product_id` bigint(20) NULL, + `nc_num` text NULL + ) ENGINE=OLAP + UNIQUE KEY(`transfer_id`) + COMMENT '涓浆杩愯緭鍗曚俊鎭�' + DISTRIBUTED BY HASH(`transfer_id`) BUCKETS 9 + PROPERTIES ( + "replication_allocation" = "tag.location.default: 1", + "storage_format" = "V2", + "light_schema_change" = "true", + "disable_auto_compaction" = "false", + "enable_single_replica_compaction" = "false" + ); + """ + + sql """insert into ${table3} values (2, 1, "12");""" + sql """insert into ${table2} values (1, 7, "12", "car", "amory is cute"); """ + sql """insert into ${table1} values (7, 30, 1, "amory clever"); """ + sql """insert into ${table1} values (1, 90, NULL, "car");""" + sql """insert into ${table3} values (1, 2, "12");""" + + qt_select_tt """ select * from ${table3};""" Review Comment: make sense! done -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
