This is an automated email from the ASF dual-hosted git repository. dataroaring pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push: new 85bd5d88bfd [test](shuffle) test insert row count when rows filtered by ExchangeNode (#34657) 85bd5d88bfd is described below commit 85bd5d88bfde1d483e6e2c962b9aba931ae32d96 Author: Kaijie Chen <c...@apache.org> AuthorDate: Sat May 11 11:05:24 2024 +0800 [test](shuffle) test insert row count when rows filtered by ExchangeNode (#34657) --- .../data/insert_p0/test_insert_row_count.out | 7 ++ .../suites/insert_p0/test_insert_row_count.groovy | 77 ++++++++++++++++++++++ 2 files changed, 84 insertions(+) diff --git a/regression-test/data/insert_p0/test_insert_row_count.out b/regression-test/data/insert_p0/test_insert_row_count.out new file mode 100644 index 00000000000..5e5ebc6985a --- /dev/null +++ b/regression-test/data/insert_p0/test_insert_row_count.out @@ -0,0 +1,7 @@ +-- This file is automatically generated. You should know what you did if you want to edit this +-- !insert1 -- +4 + +-- !insert2 -- +4 + diff --git a/regression-test/suites/insert_p0/test_insert_row_count.groovy b/regression-test/suites/insert_p0/test_insert_row_count.groovy new file mode 100644 index 00000000000..8f9ca555963 --- /dev/null +++ b/regression-test/suites/insert_p0/test_insert_row_count.groovy @@ -0,0 +1,77 @@ +// 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. + +import com.mysql.cj.jdbc.StatementImpl + +suite("test_insert_row_count") { + def dbName = "regression_test_insert_p0" + def srcTableName = "test_insert_row_count_src" + def dstTableName = "test_insert_row_count_dst" + def srcName = dbName + "." + srcTableName + def dstName = dbName + "." + dstTableName + + // create table + sql """ drop table if exists ${srcName}; """ + sql """ + CREATE TABLE ${srcName} ( + `key` int NOT NULL, + `id` int NULL, + `type` varchar(1) NULL, + `score` int NULL default "-1" + ) ENGINE=OLAP + UNIQUE KEY(`key`) + DISTRIBUTED BY HASH(`key`) BUCKETS 1 + PROPERTIES ( + "replication_num" = "1" + ); + """ + + sql """ drop table if exists ${dstName}; """ + sql """ + CREATE TABLE ${dstName} ( + `id` int NOT NULL, + `type` varchar(1) NULL, + `score` int NULL default "-1" + ) ENGINE=OLAP + UNIQUE KEY(`id`) + DISTRIBUTED BY HASH(`id`) BUCKETS 2 + PROPERTIES ( + "replication_num" = "1" + ); + """ + + // prepare data + sql """ + INSERT INTO ${srcName} (`key`, `id`, `type`, `score`) + VALUES (0, 1, "A", 9), (1, 2, NULL, 7), (2, 3, "B", 10), (3, NULL, "N", 6), (4, 5, "X", NULL), (5, NULL, "Z", 8); + """ + + sql """ SET enable_insert_strict = false; """ + + sql """ SET enable_strict_consistency_dml = false; """ + + qt_insert1 """ + INSERT INTO ${dstName} SELECT `id`, `type`, `score` FROM ${srcName}; + """ + + sql """ SET enable_strict_consistency_dml = true; """ + + qt_insert2 """ + INSERT INTO ${dstName} SELECT `id`, `type`, `score` FROM ${srcName}; + """ + +} --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org