This is an automated email from the ASF dual-hosted git repository. morrysnow pushed a commit to branch branch-2.0 in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.0 by this push: new 82bb09d312a [fix](regression) in ssb shape cases, set rf type to 8 (#31615) 82bb09d312a is described below commit 82bb09d312a87736051c122c755c275a5bc0a60b Author: minghong <engle...@gmail.com> AuthorDate: Fri Mar 1 15:57:57 2024 +0800 [fix](regression) in ssb shape cases, set rf type to 8 (#31615) pick #31529 --- .../data/nereids_ssb_shape_sf100_p0/shape/flat.out | 18 ++ .../data/nereids_ssb_shape_sf100_p0/shape/q1.1.out | 16 ++ .../data/nereids_ssb_shape_sf100_p0/shape/q1.2.out | 16 ++ .../data/nereids_ssb_shape_sf100_p0/shape/q1.3.out | 16 ++ .../data/nereids_ssb_shape_sf100_p0/shape/q2.1.out | 29 +++ .../data/nereids_ssb_shape_sf100_p0/shape/q2.2.out | 31 +++ .../data/nereids_ssb_shape_sf100_p0/shape/q2.3.out | 31 +++ .../data/nereids_ssb_shape_sf100_p0/shape/q3.1.out | 30 +++ .../data/nereids_ssb_shape_sf100_p0/shape/q3.2.out | 30 +++ .../data/nereids_ssb_shape_sf100_p0/shape/q3.3.out | 31 +++ .../data/nereids_ssb_shape_sf100_p0/shape/q3.4.out | 30 +++ .../data/nereids_ssb_shape_sf100_p0/shape/q4.1.out | 36 ++++ .../data/nereids_ssb_shape_sf100_p0/shape/q4.2.out | 37 ++++ .../data/nereids_ssb_shape_sf100_p0/shape/q4.3.out | 34 ++++ .../suites/nereids_ssb_shape_sf100_p0/load.groovy | 215 +++++++++++++++++++++ .../nereids_ssb_shape_sf100_p0/shape/flat.groovy | 103 ++++++++++ .../nereids_ssb_shape_sf100_p0/shape/q1.1.groovy | 44 +++++ .../nereids_ssb_shape_sf100_p0/shape/q1.2.groovy | 44 +++++ .../nereids_ssb_shape_sf100_p0/shape/q1.3.groovy | 46 +++++ .../nereids_ssb_shape_sf100_p0/shape/q2.1.groovy | 47 +++++ .../nereids_ssb_shape_sf100_p0/shape/q2.2.groovy | 47 +++++ .../nereids_ssb_shape_sf100_p0/shape/q2.3.groovy | 47 +++++ .../nereids_ssb_shape_sf100_p0/shape/q3.1.groovy | 53 +++++ .../nereids_ssb_shape_sf100_p0/shape/q3.2.groovy | 53 +++++ .../nereids_ssb_shape_sf100_p0/shape/q3.3.groovy | 59 ++++++ .../nereids_ssb_shape_sf100_p0/shape/q3.4.groovy | 58 ++++++ .../nereids_ssb_shape_sf100_p0/shape/q4.1.groovy | 55 ++++++ .../nereids_ssb_shape_sf100_p0/shape/q4.2.groovy | 60 ++++++ .../nereids_ssb_shape_sf100_p0/shape/q4.3.groovy | 56 ++++++ 29 files changed, 1372 insertions(+) diff --git a/regression-test/data/nereids_ssb_shape_sf100_p0/shape/flat.out b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/flat.out new file mode 100644 index 00000000000..5cb66b49bc7 --- /dev/null +++ b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/flat.out @@ -0,0 +1,18 @@ +-- This file is automatically generated. You should know what you did if you want to edit this +-- !select -- +PhysicalResultSink +--PhysicalDistribute +----PhysicalProject +------hashJoin[INNER_JOIN](s.s_suppkey = l.lo_suppkey) +--------PhysicalProject +----------hashJoin[INNER_JOIN](c.c_custkey = l.lo_custkey) +------------PhysicalDistribute +--------------hashJoin[INNER_JOIN](p.p_partkey = l.lo_partkey) +----------------PhysicalOlapScan[lineorder] +----------------PhysicalDistribute +------------------PhysicalOlapScan[part] +------------PhysicalDistribute +--------------PhysicalOlapScan[customer] +--------PhysicalDistribute +----------PhysicalOlapScan[supplier] + diff --git a/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q1.1.out b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q1.1.out new file mode 100644 index 00000000000..19bef3de9ec --- /dev/null +++ b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q1.1.out @@ -0,0 +1,16 @@ +-- This file is automatically generated. You should know what you did if you want to edit this +-- !select -- +PhysicalResultSink +--hashAgg[GLOBAL] +----PhysicalDistribute +------hashAgg[LOCAL] +--------PhysicalProject +----------hashJoin[INNER_JOIN](lineorder.lo_orderdate = dates.d_datekey) +------------PhysicalProject +--------------filter((lineorder.lo_discount <= 3)(lineorder.lo_discount >= 1)(lineorder.lo_quantity < 25)) +----------------PhysicalOlapScan[lineorder] +------------PhysicalDistribute +--------------PhysicalProject +----------------filter((dates.d_year = 1993)) +------------------PhysicalOlapScan[dates] + diff --git a/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q1.2.out b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q1.2.out new file mode 100644 index 00000000000..f1ac2986577 --- /dev/null +++ b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q1.2.out @@ -0,0 +1,16 @@ +-- This file is automatically generated. You should know what you did if you want to edit this +-- !select -- +PhysicalResultSink +--hashAgg[GLOBAL] +----PhysicalDistribute +------hashAgg[LOCAL] +--------PhysicalProject +----------hashJoin[INNER_JOIN](lineorder.lo_orderdate = dates.d_datekey) +------------PhysicalProject +--------------filter((lineorder.lo_quantity <= 35)(lineorder.lo_discount <= 6)(lineorder.lo_discount >= 4)(lineorder.lo_quantity >= 26)) +----------------PhysicalOlapScan[lineorder] +------------PhysicalDistribute +--------------PhysicalProject +----------------filter((dates.d_yearmonth = 'Jan1994')) +------------------PhysicalOlapScan[dates] + diff --git a/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q1.3.out b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q1.3.out new file mode 100644 index 00000000000..1e4a6a40b51 --- /dev/null +++ b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q1.3.out @@ -0,0 +1,16 @@ +-- This file is automatically generated. You should know what you did if you want to edit this +-- !select -- +PhysicalResultSink +--hashAgg[GLOBAL] +----PhysicalDistribute +------hashAgg[LOCAL] +--------PhysicalProject +----------hashJoin[INNER_JOIN](lineorder.lo_orderdate = dates.d_datekey) +------------PhysicalProject +--------------filter((lineorder.lo_discount <= 7)(lineorder.lo_discount >= 5)(lineorder.lo_quantity <= 35)(lineorder.lo_quantity >= 26)) +----------------PhysicalOlapScan[lineorder] +------------PhysicalDistribute +--------------PhysicalProject +----------------filter((dates.d_year = 1994)(dates.d_weeknuminyear = 6)) +------------------PhysicalOlapScan[dates] + diff --git a/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q2.1.out b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q2.1.out new file mode 100644 index 00000000000..440e2327473 --- /dev/null +++ b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q2.1.out @@ -0,0 +1,29 @@ +-- This file is automatically generated. You should know what you did if you want to edit this +-- !select -- +PhysicalResultSink +--PhysicalQuickSort +----PhysicalDistribute +------PhysicalQuickSort +--------PhysicalProject +----------hashAgg[GLOBAL] +------------PhysicalDistribute +--------------hashAgg[LOCAL] +----------------PhysicalProject +------------------hashJoin[INNER_JOIN](lineorder.lo_orderdate = dates.d_datekey) +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN](lineorder.lo_suppkey = supplier.s_suppkey) +------------------------hashJoin[INNER_JOIN](lineorder.lo_partkey = part.p_partkey) +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[lineorder] +--------------------------PhysicalDistribute +----------------------------PhysicalProject +------------------------------filter((part.p_category = 'MFGR#12')) +--------------------------------PhysicalOlapScan[part] +------------------------PhysicalDistribute +--------------------------PhysicalProject +----------------------------filter((supplier.s_region = 'AMERICA')) +------------------------------PhysicalOlapScan[supplier] +--------------------PhysicalDistribute +----------------------PhysicalProject +------------------------PhysicalOlapScan[dates] + diff --git a/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q2.2.out b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q2.2.out new file mode 100644 index 00000000000..de0b1d9ce05 --- /dev/null +++ b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q2.2.out @@ -0,0 +1,31 @@ +-- This file is automatically generated. You should know what you did if you want to edit this +-- !select -- +PhysicalResultSink +--PhysicalQuickSort +----PhysicalDistribute +------PhysicalQuickSort +--------PhysicalProject +----------hashAgg[GLOBAL] +------------PhysicalDistribute +--------------hashAgg[LOCAL] +----------------PhysicalProject +------------------hashJoin[INNER_JOIN](lineorder.lo_orderdate = dates.d_datekey) +--------------------PhysicalDistribute +----------------------PhysicalProject +------------------------hashJoin[INNER_JOIN](lineorder.lo_suppkey = supplier.s_suppkey) +--------------------------PhysicalDistribute +----------------------------hashJoin[INNER_JOIN](lineorder.lo_partkey = part.p_partkey) +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[lineorder] +------------------------------PhysicalDistribute +--------------------------------PhysicalProject +----------------------------------filter((part.p_brand >= 'MFGR#2221')(part.p_brand <= 'MFGR#2228')) +------------------------------------PhysicalOlapScan[part] +--------------------------PhysicalDistribute +----------------------------PhysicalProject +------------------------------filter((supplier.s_region = 'ASIA')) +--------------------------------PhysicalOlapScan[supplier] +--------------------PhysicalDistribute +----------------------PhysicalProject +------------------------PhysicalOlapScan[dates] + diff --git a/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q2.3.out b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q2.3.out new file mode 100644 index 00000000000..17b70822a93 --- /dev/null +++ b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q2.3.out @@ -0,0 +1,31 @@ +-- This file is automatically generated. You should know what you did if you want to edit this +-- !select -- +PhysicalResultSink +--PhysicalQuickSort +----PhysicalDistribute +------PhysicalQuickSort +--------PhysicalProject +----------hashAgg[GLOBAL] +------------PhysicalDistribute +--------------hashAgg[LOCAL] +----------------PhysicalProject +------------------hashJoin[INNER_JOIN](lineorder.lo_orderdate = dates.d_datekey) +--------------------PhysicalDistribute +----------------------PhysicalProject +------------------------hashJoin[INNER_JOIN](lineorder.lo_suppkey = supplier.s_suppkey) +--------------------------PhysicalDistribute +----------------------------hashJoin[INNER_JOIN](lineorder.lo_partkey = part.p_partkey) +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[lineorder] +------------------------------PhysicalDistribute +--------------------------------PhysicalProject +----------------------------------filter((part.p_brand = 'MFGR#2239')) +------------------------------------PhysicalOlapScan[part] +--------------------------PhysicalDistribute +----------------------------PhysicalProject +------------------------------filter((supplier.s_region = 'EUROPE')) +--------------------------------PhysicalOlapScan[supplier] +--------------------PhysicalDistribute +----------------------PhysicalProject +------------------------PhysicalOlapScan[dates] + diff --git a/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q3.1.out b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q3.1.out new file mode 100644 index 00000000000..2ed9372602d --- /dev/null +++ b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q3.1.out @@ -0,0 +1,30 @@ +-- This file is automatically generated. You should know what you did if you want to edit this +-- !select -- +PhysicalResultSink +--PhysicalQuickSort +----PhysicalDistribute +------PhysicalQuickSort +--------hashAgg[GLOBAL] +----------PhysicalDistribute +------------hashAgg[LOCAL] +--------------PhysicalProject +----------------hashJoin[INNER_JOIN](lineorder.lo_orderdate = dates.d_datekey) +------------------PhysicalProject +--------------------hashJoin[INNER_JOIN](lineorder.lo_custkey = customer.c_custkey) +----------------------PhysicalDistribute +------------------------hashJoin[INNER_JOIN](lineorder.lo_suppkey = supplier.s_suppkey) +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[lineorder] +--------------------------PhysicalDistribute +----------------------------PhysicalProject +------------------------------filter((supplier.s_region = 'ASIA')) +--------------------------------PhysicalOlapScan[supplier] +----------------------PhysicalDistribute +------------------------PhysicalProject +--------------------------filter((customer.c_region = 'ASIA')) +----------------------------PhysicalOlapScan[customer] +------------------PhysicalDistribute +--------------------PhysicalProject +----------------------filter((dates.d_year <= 1997)(dates.d_year >= 1992)) +------------------------PhysicalOlapScan[dates] + diff --git a/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q3.2.out b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q3.2.out new file mode 100644 index 00000000000..b181c7be1c8 --- /dev/null +++ b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q3.2.out @@ -0,0 +1,30 @@ +-- This file is automatically generated. You should know what you did if you want to edit this +-- !select -- +PhysicalResultSink +--PhysicalQuickSort +----PhysicalDistribute +------PhysicalQuickSort +--------hashAgg[GLOBAL] +----------PhysicalDistribute +------------hashAgg[LOCAL] +--------------PhysicalProject +----------------hashJoin[INNER_JOIN](lineorder.lo_orderdate = dates.d_datekey) +------------------PhysicalProject +--------------------hashJoin[INNER_JOIN](lineorder.lo_custkey = customer.c_custkey) +----------------------PhysicalDistribute +------------------------hashJoin[INNER_JOIN](lineorder.lo_suppkey = supplier.s_suppkey) +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[lineorder] +--------------------------PhysicalDistribute +----------------------------PhysicalProject +------------------------------filter((supplier.s_nation = 'UNITED STATES')) +--------------------------------PhysicalOlapScan[supplier] +----------------------PhysicalDistribute +------------------------PhysicalProject +--------------------------filter((customer.c_nation = 'UNITED STATES')) +----------------------------PhysicalOlapScan[customer] +------------------PhysicalDistribute +--------------------PhysicalProject +----------------------filter((dates.d_year <= 1997)(dates.d_year >= 1992)) +------------------------PhysicalOlapScan[dates] + diff --git a/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q3.3.out b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q3.3.out new file mode 100644 index 00000000000..d7bdbaa77ba --- /dev/null +++ b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q3.3.out @@ -0,0 +1,31 @@ +-- This file is automatically generated. You should know what you did if you want to edit this +-- !select -- +PhysicalResultSink +--PhysicalQuickSort +----PhysicalDistribute +------PhysicalQuickSort +--------hashAgg[GLOBAL] +----------PhysicalDistribute +------------hashAgg[LOCAL] +--------------PhysicalProject +----------------hashJoin[INNER_JOIN](lineorder.lo_orderdate = dates.d_datekey) +------------------PhysicalDistribute +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN](lineorder.lo_custkey = customer.c_custkey) +------------------------PhysicalDistribute +--------------------------hashJoin[INNER_JOIN](lineorder.lo_suppkey = supplier.s_suppkey) +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[lineorder] +----------------------------PhysicalDistribute +------------------------------PhysicalProject +--------------------------------filter(s_city IN ('UNITED KI5', 'UNITED KI1')) +----------------------------------PhysicalOlapScan[supplier] +------------------------PhysicalDistribute +--------------------------PhysicalProject +----------------------------filter(c_city IN ('UNITED KI5', 'UNITED KI1')) +------------------------------PhysicalOlapScan[customer] +------------------PhysicalDistribute +--------------------PhysicalProject +----------------------filter((dates.d_year <= 1997)(dates.d_year >= 1992)) +------------------------PhysicalOlapScan[dates] + diff --git a/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q3.4.out b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q3.4.out new file mode 100644 index 00000000000..ad9c6d46496 --- /dev/null +++ b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q3.4.out @@ -0,0 +1,30 @@ +-- This file is automatically generated. You should know what you did if you want to edit this +-- !select -- +PhysicalResultSink +--PhysicalQuickSort +----PhysicalDistribute +------PhysicalQuickSort +--------hashAgg[GLOBAL] +----------PhysicalDistribute +------------hashAgg[LOCAL] +--------------PhysicalProject +----------------hashJoin[INNER_JOIN](lineorder.lo_custkey = customer.c_custkey) +------------------PhysicalDistribute +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN](lineorder.lo_orderdate = dates.d_datekey) +------------------------hashJoin[INNER_JOIN](lineorder.lo_suppkey = supplier.s_suppkey) +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[lineorder] +--------------------------PhysicalDistribute +----------------------------PhysicalProject +------------------------------filter(s_city IN ('UNITED KI5', 'UNITED KI1')) +--------------------------------PhysicalOlapScan[supplier] +------------------------PhysicalDistribute +--------------------------PhysicalProject +----------------------------filter((dates.d_yearmonth = 'Dec1997')) +------------------------------PhysicalOlapScan[dates] +------------------PhysicalDistribute +--------------------PhysicalProject +----------------------filter(c_city IN ('UNITED KI5', 'UNITED KI1')) +------------------------PhysicalOlapScan[customer] + diff --git a/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q4.1.out b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q4.1.out new file mode 100644 index 00000000000..26598711983 --- /dev/null +++ b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q4.1.out @@ -0,0 +1,36 @@ +-- This file is automatically generated. You should know what you did if you want to edit this +-- !select -- +PhysicalResultSink +--PhysicalQuickSort +----PhysicalDistribute +------PhysicalQuickSort +--------hashAgg[GLOBAL] +----------PhysicalDistribute +------------hashAgg[LOCAL] +--------------PhysicalProject +----------------hashJoin[INNER_JOIN](lineorder.lo_orderdate = dates.d_datekey) +------------------PhysicalProject +--------------------hashJoin[INNER_JOIN](lineorder.lo_partkey = part.p_partkey) +----------------------PhysicalDistribute +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN](lineorder.lo_custkey = customer.c_custkey) +----------------------------PhysicalDistribute +------------------------------hashJoin[INNER_JOIN](lineorder.lo_suppkey = supplier.s_suppkey) +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[lineorder] +--------------------------------PhysicalDistribute +----------------------------------PhysicalProject +------------------------------------filter((supplier.s_region = 'AMERICA')) +--------------------------------------PhysicalOlapScan[supplier] +----------------------------PhysicalDistribute +------------------------------PhysicalProject +--------------------------------filter((customer.c_region = 'AMERICA')) +----------------------------------PhysicalOlapScan[customer] +----------------------PhysicalDistribute +------------------------PhysicalProject +--------------------------filter(p_mfgr IN ('MFGR#1', 'MFGR#2')) +----------------------------PhysicalOlapScan[part] +------------------PhysicalDistribute +--------------------PhysicalProject +----------------------PhysicalOlapScan[dates] + diff --git a/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q4.2.out b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q4.2.out new file mode 100644 index 00000000000..8a50b45af6b --- /dev/null +++ b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q4.2.out @@ -0,0 +1,37 @@ +-- This file is automatically generated. You should know what you did if you want to edit this +-- !select -- +PhysicalResultSink +--PhysicalQuickSort +----PhysicalDistribute +------PhysicalQuickSort +--------hashAgg[GLOBAL] +----------PhysicalDistribute +------------hashAgg[LOCAL] +--------------PhysicalProject +----------------hashJoin[INNER_JOIN](lineorder.lo_partkey = part.p_partkey) +------------------PhysicalDistribute +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN](lineorder.lo_custkey = customer.c_custkey) +------------------------PhysicalDistribute +--------------------------PhysicalProject +----------------------------hashJoin[INNER_JOIN](lineorder.lo_orderdate = dates.d_datekey) +------------------------------hashJoin[INNER_JOIN](lineorder.lo_suppkey = supplier.s_suppkey) +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[lineorder] +--------------------------------PhysicalDistribute +----------------------------------PhysicalProject +------------------------------------filter((supplier.s_region = 'AMERICA')) +--------------------------------------PhysicalOlapScan[supplier] +------------------------------PhysicalDistribute +--------------------------------PhysicalProject +----------------------------------filter(d_year IN (1997, 1998)) +------------------------------------PhysicalOlapScan[dates] +------------------------PhysicalDistribute +--------------------------PhysicalProject +----------------------------filter((customer.c_region = 'AMERICA')) +------------------------------PhysicalOlapScan[customer] +------------------PhysicalDistribute +--------------------PhysicalProject +----------------------filter(p_mfgr IN ('MFGR#1', 'MFGR#2')) +------------------------PhysicalOlapScan[part] + diff --git a/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q4.3.out b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q4.3.out new file mode 100644 index 00000000000..04f46355d63 --- /dev/null +++ b/regression-test/data/nereids_ssb_shape_sf100_p0/shape/q4.3.out @@ -0,0 +1,34 @@ +-- This file is automatically generated. You should know what you did if you want to edit this +-- !select -- +PhysicalResultSink +--PhysicalQuickSort +----PhysicalDistribute +------PhysicalQuickSort +--------hashAgg[GLOBAL] +----------PhysicalDistribute +------------hashAgg[LOCAL] +--------------PhysicalProject +----------------hashJoin[INNER_JOIN](lineorder.lo_custkey = customer.c_custkey) +------------------PhysicalProject +--------------------PhysicalOlapScan[customer] +------------------PhysicalDistribute +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN](lineorder.lo_orderdate = dates.d_datekey) +------------------------hashJoin[INNER_JOIN](lineorder.lo_partkey = part.p_partkey) +--------------------------PhysicalDistribute +----------------------------hashJoin[INNER_JOIN](lineorder.lo_suppkey = supplier.s_suppkey) +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[lineorder] +------------------------------PhysicalDistribute +--------------------------------PhysicalProject +----------------------------------filter((supplier.s_nation = 'UNITED STATES')) +------------------------------------PhysicalOlapScan[supplier] +--------------------------PhysicalDistribute +----------------------------PhysicalProject +------------------------------filter((part.p_category = 'MFGR#14')) +--------------------------------PhysicalOlapScan[part] +------------------------PhysicalDistribute +--------------------------PhysicalProject +----------------------------filter(d_year IN (1997, 1998)) +------------------------------PhysicalOlapScan[dates] + diff --git a/regression-test/suites/nereids_ssb_shape_sf100_p0/load.groovy b/regression-test/suites/nereids_ssb_shape_sf100_p0/load.groovy new file mode 100644 index 00000000000..f7fe30c4cef --- /dev/null +++ b/regression-test/suites/nereids_ssb_shape_sf100_p0/load.groovy @@ -0,0 +1,215 @@ +// 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("load") { + String database = context.config.getDbNameByFile(context.file) + sql "drop database if exists ${database}" + sql "create database ${database}" + sql "use ${database}" + sql """ +CREATE TABLE IF NOT EXISTS `lineorder` ( + `lo_orderkey` int(11) NOT NULL COMMENT '', + `lo_linenumber` int(11) NOT NULL COMMENT '', + `lo_custkey` int(11) NOT NULL COMMENT '', + `lo_partkey` int(11) NOT NULL COMMENT '', + `lo_suppkey` int(11) NOT NULL COMMENT '', + `lo_orderdate` int(11) NOT NULL COMMENT '', + `lo_orderpriority` varchar(16) NOT NULL COMMENT '', + `lo_shippriority` int(11) NOT NULL COMMENT '', + `lo_quantity` int(11) NOT NULL COMMENT '', + `lo_extendedprice` int(11) NOT NULL COMMENT '', + `lo_ordtotalprice` int(11) NOT NULL COMMENT '', + `lo_discount` int(11) NOT NULL COMMENT '', + `lo_revenue` int(11) NOT NULL COMMENT '', + `lo_supplycost` int(11) NOT NULL COMMENT '', + `lo_tax` int(11) NOT NULL COMMENT '', + `lo_commitdate` int(11) NOT NULL COMMENT '', + `lo_shipmode` varchar(11) NOT NULL COMMENT '' +) ENGINE=OLAP +DUPLICATE KEY(`lo_orderkey`) +COMMENT "OLAP" +PARTITION BY RANGE(`lo_orderdate`) +(PARTITION p1 VALUES [("-2147483648"), ("19930101")), +PARTITION p2 VALUES [("19930101"), ("19940101")), +PARTITION p3 VALUES [("19940101"), ("19950101")), +PARTITION p4 VALUES [("19950101"), ("19960101")), +PARTITION p5 VALUES [("19960101"), ("19970101")), +PARTITION p6 VALUES [("19970101"), ("19980101")), +PARTITION p7 VALUES [("19980101"), ("19990101"))) +DISTRIBUTED BY HASH(`lo_orderkey`) BUCKETS 48 +PROPERTIES ( +"replication_num" = "1", +"colocate_with" = "groupa1", +"in_memory" = "false", +"storage_format" = "DEFAULT" +);""" + +sql """ +CREATE TABLE IF NOT EXISTS `customer` ( + `c_custkey` int(11) NOT NULL COMMENT '', + `c_name` varchar(26) NOT NULL COMMENT '', + `c_address` varchar(41) NOT NULL COMMENT '', + `c_city` varchar(11) NOT NULL COMMENT '', + `c_nation` varchar(16) NOT NULL COMMENT '', + `c_region` varchar(13) NOT NULL COMMENT '', + `c_phone` varchar(16) NOT NULL COMMENT '', + `c_mktsegment` varchar(11) NOT NULL COMMENT '' +) ENGINE=OLAP +DUPLICATE KEY(`c_custkey`) +COMMENT "OLAP" +DISTRIBUTED BY HASH(`c_custkey`) BUCKETS 12 +PROPERTIES ( +"replication_num" = "1", +"colocate_with" = "groupa2", +"in_memory" = "false", +"storage_format" = "DEFAULT" +);""" + +sql """ +CREATE TABLE IF NOT EXISTS `dates` ( + `d_datekey` int(11) NOT NULL COMMENT '', + `d_date` varchar(20) NOT NULL COMMENT '', + `d_dayofweek` varchar(10) NOT NULL COMMENT '', + `d_month` varchar(11) NOT NULL COMMENT '', + `d_year` int(11) NOT NULL COMMENT '', + `d_yearmonthnum` int(11) NOT NULL COMMENT '', + `d_yearmonth` varchar(9) NOT NULL COMMENT '', + `d_daynuminweek` int(11) NOT NULL COMMENT '', + `d_daynuminmonth` int(11) NOT NULL COMMENT '', + `d_daynuminyear` int(11) NOT NULL COMMENT '', + `d_monthnuminyear` int(11) NOT NULL COMMENT '', + `d_weeknuminyear` int(11) NOT NULL COMMENT '', + `d_sellingseason` varchar(14) NOT NULL COMMENT '', + `d_lastdayinweekfl` int(11) NOT NULL COMMENT '', + `d_lastdayinmonthfl` int(11) NOT NULL COMMENT '', + `d_holidayfl` int(11) NOT NULL COMMENT '', + `d_weekdayfl` int(11) NOT NULL COMMENT '' +) ENGINE=OLAP +DUPLICATE KEY(`d_datekey`) +COMMENT "OLAP" +DISTRIBUTED BY HASH(`d_datekey`) BUCKETS 1 +PROPERTIES ( +"replication_num" = "1", +"in_memory" = "false", +"colocate_with" = "groupa3", +"storage_format" = "DEFAULT" +);""" + +sql """ + + CREATE TABLE IF NOT EXISTS `supplier` ( + `s_suppkey` int(11) NOT NULL COMMENT '', + `s_name` varchar(26) NOT NULL COMMENT '', + `s_address` varchar(26) NOT NULL COMMENT '', + `s_city` varchar(11) NOT NULL COMMENT '', + `s_nation` varchar(16) NOT NULL COMMENT '', + `s_region` varchar(13) NOT NULL COMMENT '', + `s_phone` varchar(16) NOT NULL COMMENT '' +) ENGINE=OLAP +DUPLICATE KEY(`s_suppkey`) +COMMENT "OLAP" +DISTRIBUTED BY HASH(`s_suppkey`) BUCKETS 12 +PROPERTIES ( +"replication_num" = "1", +"colocate_with" = "groupa4", +"in_memory" = "false", +"storage_format" = "DEFAULT" +);""" + +sql """ +CREATE TABLE IF NOT EXISTS `part` ( + `p_partkey` int(11) NOT NULL COMMENT '', + `p_name` varchar(23) NOT NULL COMMENT '', + `p_mfgr` varchar(7) NOT NULL COMMENT '', + `p_category` varchar(8) NOT NULL COMMENT '', + `p_brand` varchar(10) NOT NULL COMMENT '', + `p_color` varchar(12) NOT NULL COMMENT '', + `p_type` varchar(26) NOT NULL COMMENT '', + `p_size` int(11) NOT NULL COMMENT '', + `p_container` varchar(11) NOT NULL COMMENT '' +) ENGINE=OLAP +DUPLICATE KEY(`p_partkey`) +COMMENT "OLAP" +DISTRIBUTED BY HASH(`p_partkey`) BUCKETS 12 +PROPERTIES ( +"replication_num" = "1", +"colocate_with" = "groupa5", +"in_memory" = "false", +"storage_format" = "DEFAULT" +);""" + +sql """alter table dates modify column d_lastdayinweekfl set stats ('row_count'='2556', 'ndv'='2', 'num_nulls'='0', 'min_value'='0', 'max_value'='1', 'data_size'='10224');""" +sql """alter table supplier modify column s_suppkey set stats ('row_count'='200000', 'ndv'='196099', 'num_nulls'='0', 'min_value'='1', 'max_value'='200000', 'data_size'='800000');""" +sql """alter table lineorder modify column lo_quantity set stats ('row_count'='600037902', 'ndv'='50', 'num_nulls'='0', 'min_value'='1', 'max_value'='50', 'data_size'='2400151608');""" +sql """alter table lineorder modify column lo_shipmode set stats ('row_count'='600037902', 'ndv'='7', 'num_nulls'='0', 'min_value'='AIR', 'max_value'='TRUCK', 'data_size'='2571562204');""" +sql """alter table customer modify column c_name set stats ('row_count'='3000000', 'ndv'='3017713', 'num_nulls'='0', 'min_value'='Customer#000000001', 'max_value'='Customer#003000000', 'data_size'='54000000');""" +sql """alter table dates modify column d_date set stats ('row_count'='2556', 'ndv'='2539', 'num_nulls'='0', 'min_value'='April 1, 1992', 'max_value'='September 9, 1998', 'data_size'='38181');""" +sql """alter table dates modify column d_daynuminyear set stats ('row_count'='2556', 'ndv'='366', 'num_nulls'='0', 'min_value'='1', 'max_value'='366', 'data_size'='10224');""" +sql """alter table dates modify column d_yearmonth set stats ('row_count'='2556', 'ndv'='84', 'num_nulls'='0', 'min_value'='Apr1992', 'max_value'='Sep1998', 'data_size'='17892');""" +sql """alter table part modify column p_mfgr set stats ('row_count'='1400000', 'ndv'='5', 'num_nulls'='0', 'min_value'='MFGR#1', 'max_value'='MFGR#5', 'data_size'='8400000');""" +sql """alter table part modify column p_name set stats ('row_count'='1400000', 'ndv'='8417', 'num_nulls'='0', 'min_value'='almond antique', 'max_value'='yellow white', 'data_size'='17705366');""" +sql """alter table lineorder modify column lo_extendedprice set stats ('row_count'='600037902', 'ndv'='1135983', 'num_nulls'='0', 'min_value'='90096', 'max_value'='10494950', 'data_size'='2400151608');""" +sql """alter table lineorder modify column lo_linenumber set stats ('row_count'='600037902', 'ndv'='7', 'num_nulls'='0', 'min_value'='1', 'max_value'='7', 'data_size'='2400151608');""" +sql """alter table lineorder modify column lo_partkey set stats ('row_count'='600037902', 'ndv'='999528', 'num_nulls'='0', 'min_value'='1', 'max_value'='1000000', 'data_size'='2400151608');""" +sql """alter table lineorder modify column lo_shippriority set stats ('row_count'='600037902', 'ndv'='1', 'num_nulls'='0', 'min_value'='0', 'max_value'='0', 'data_size'='2400151608');""" +sql """alter table customer modify column c_mktsegment set stats ('row_count'='3000000', 'ndv'='5', 'num_nulls'='0', 'min_value'='AUTOMOBILE', 'max_value'='MACHINERY', 'data_size'='26999329');""" +sql """alter table dates modify column d_dayofweek set stats ('row_count'='2556', 'ndv'='7', 'num_nulls'='0', 'min_value'='Friday', 'max_value'='Wednesday', 'data_size'='18258');""" +sql """alter table dates modify column d_sellingseason set stats ('row_count'='2556', 'ndv'='5', 'num_nulls'='0', 'min_value'='Christmas', 'max_value'='Winter', 'data_size'='15760');""" +sql """alter table dates modify column d_weekdayfl set stats ('row_count'='2556', 'ndv'='2', 'num_nulls'='0', 'min_value'='0', 'max_value'='1', 'data_size'='10224');""" +sql """alter table supplier modify column s_city set stats ('row_count'='200000', 'ndv'='250', 'num_nulls'='0', 'min_value'='ALGERIA 0', 'max_value'='VIETNAM 9', 'data_size'='2000000');""" +sql """alter table part modify column p_category set stats ('row_count'='1400000', 'ndv'='25', 'num_nulls'='0', 'min_value'='MFGR#11', 'max_value'='MFGR#55', 'data_size'='9800000');""" +sql """alter table part modify column p_size set stats ('row_count'='1400000', 'ndv'='50', 'num_nulls'='0', 'min_value'='1', 'max_value'='50', 'data_size'='5600000');""" +sql """alter table part modify column p_type set stats ('row_count'='1400000', 'ndv'='150', 'num_nulls'='0', 'min_value'='ECONOMY ANODIZED BRASS', 'max_value'='STANDARD POLISHED TIN', 'data_size'='28837497');""" +sql """alter table lineorder modify column lo_orderkey set stats ('row_count'='600037902', 'ndv'='148064528', 'num_nulls'='0', 'min_value'='1', 'max_value'='600000000', 'data_size'='2400151608');""" +sql """alter table lineorder modify column lo_revenue set stats ('row_count'='600037902', 'ndv'='6280312', 'num_nulls'='0', 'min_value'='81087', 'max_value'='10494950', 'data_size'='2400151608');""" +sql """alter table lineorder modify column lo_suppkey set stats ('row_count'='600037902', 'ndv'='196099', 'num_nulls'='0', 'min_value'='1', 'max_value'='200000', 'data_size'='2400151608');""" +sql """alter table lineorder modify column lo_supplycost set stats ('row_count'='600037902', 'ndv'='15824', 'num_nulls'='0', 'min_value'='54057', 'max_value'='125939', 'data_size'='2400151608');""" +sql """alter table customer modify column c_address set stats ('row_count'='3000000', 'ndv'='3011483', 'num_nulls'='0', 'min_value'=' yaP00NZn4mxv', 'max_value'='zzzzsVRceYXRDisV3RC', 'data_size'='44994193');""" +sql """alter table dates modify column d_datekey set stats ('row_count'='2556', 'ndv'='2560', 'num_nulls'='0', 'min_value'='19920101', 'max_value'='19981230', 'data_size'='10224');""" +sql """alter table dates modify column d_daynuminmonth set stats ('row_count'='2556', 'ndv'='31', 'num_nulls'='0', 'min_value'='1', 'max_value'='31', 'data_size'='10224');""" +sql """alter table dates modify column d_year set stats ('row_count'='2556', 'ndv'='7', 'num_nulls'='0', 'min_value'='1992', 'max_value'='1998', 'data_size'='10224');""" +sql """alter table supplier modify column s_address set stats ('row_count'='200000', 'ndv'='197960', 'num_nulls'='0', 'min_value'=' 2MrUy', 'max_value'='zzzqXhTdKxT0RAR8yxbc', 'data_size'='2998285');""" +sql """alter table lineorder modify column lo_commitdate set stats ('row_count'='600037902', 'ndv'='2469', 'num_nulls'='0', 'min_value'='19920131', 'max_value'='19981031', 'data_size'='2400151608');""" +sql """alter table lineorder modify column lo_tax set stats ('row_count'='600037902', 'ndv'='9', 'num_nulls'='0', 'min_value'='0', 'max_value'='8', 'data_size'='2400151608');""" +sql """alter table customer modify column c_city set stats ('row_count'='3000000', 'ndv'='250', 'num_nulls'='0', 'min_value'='ALGERIA 0', 'max_value'='VIETNAM 9', 'data_size'='30000000');""" +sql """alter table customer modify column c_custkey set stats ('row_count'='3000000', 'ndv'='2985828', 'num_nulls'='0', 'min_value'='1', 'max_value'='3000000', 'data_size'='12000000');""" +sql """alter table dates modify column d_daynuminweek set stats ('row_count'='2556', 'ndv'='7', 'num_nulls'='0', 'min_value'='1', 'max_value'='7', 'data_size'='10224');""" +sql """alter table dates modify column d_lastdayinmonthfl set stats ('row_count'='2556', 'ndv'='2', 'num_nulls'='0', 'min_value'='0', 'max_value'='1', 'data_size'='10224');""" +sql """alter table dates modify column d_month set stats ('row_count'='2556', 'ndv'='12', 'num_nulls'='0', 'min_value'='April', 'max_value'='September', 'data_size'='15933');""" +sql """alter table dates modify column d_yearmonthnum set stats ('row_count'='2556', 'ndv'='84', 'num_nulls'='0', 'min_value'='199201', 'max_value'='199812', 'data_size'='10224');""" +sql """alter table supplier modify column s_phone set stats ('row_count'='200000', 'ndv'='199261', 'num_nulls'='0', 'min_value'='10-100-177-2350', 'max_value'='34-999-827-8511', 'data_size'='3000000');""" +sql """alter table part modify column p_partkey set stats ('row_count'='1400000', 'ndv'='1394881', 'num_nulls'='0', 'min_value'='1', 'max_value'='1400000', 'data_size'='5600000');""" +sql """alter table lineorder modify column lo_custkey set stats ('row_count'='600037902', 'ndv'='1962895', 'num_nulls'='0', 'min_value'='1', 'max_value'='2999999', 'data_size'='2400151608');""" +sql """alter table lineorder modify column lo_orderdate set stats ('row_count'='600037902', 'ndv'='2408', 'num_nulls'='0', 'min_value'='19920101', 'max_value'='19980802', 'data_size'='2400151608');""" +sql """alter table lineorder modify column lo_ordtotalprice set stats ('row_count'='600037902', 'ndv'='35026888', 'num_nulls'='0', 'min_value'='81806', 'max_value'='60690215', 'data_size'='2400151608');""" +sql """alter table customer modify column c_nation set stats ('row_count'='3000000', 'ndv'='25', 'num_nulls'='0', 'min_value'='ALGERIA', 'max_value'='VIETNAM', 'data_size'='21248112');""" +sql """alter table customer modify column c_phone set stats ('row_count'='3000000', 'ndv'='3012496', 'num_nulls'='0', 'min_value'='10-100-106-1617', 'max_value'='34-999-998-5763', 'data_size'='45000000');""" +sql """alter table customer modify column c_region set stats ('row_count'='3000000', 'ndv'='5', 'num_nulls'='0', 'min_value'='AFRICA', 'max_value'='MIDDLE EAST', 'data_size'='20398797');""" +sql """alter table dates modify column d_holidayfl set stats ('row_count'='2556', 'ndv'='2', 'num_nulls'='0', 'min_value'='0', 'max_value'='1', 'data_size'='10224');""" +sql """alter table dates modify column d_weeknuminyear set stats ('row_count'='2556', 'ndv'='53', 'num_nulls'='0', 'min_value'='1', 'max_value'='53', 'data_size'='10224');""" +sql """alter table supplier modify column s_nation set stats ('row_count'='200000', 'ndv'='25', 'num_nulls'='0', 'min_value'='ALGERIA', 'max_value'='VIETNAM', 'data_size'='1415335');""" +sql """alter table part modify column p_brand set stats ('row_count'='1400000', 'ndv'='1002', 'num_nulls'='0', 'min_value'='MFGR#111', 'max_value'='MFGR#559', 'data_size'='12285135');""" +sql """alter table part modify column p_color set stats ('row_count'='1400000', 'ndv'='92', 'num_nulls'='0', 'min_value'='almond', 'max_value'='yellow', 'data_size'='8170588');""" +sql """alter table part modify column p_container set stats ('row_count'='1400000', 'ndv'='40', 'num_nulls'='0', 'min_value'='JUMBO BAG', 'max_value'='WRAP PKG', 'data_size'='10606696');""" +sql """alter table lineorder modify column lo_discount set stats ('row_count'='600037902', 'ndv'='11', 'num_nulls'='0', 'min_value'='0', 'max_value'='10', 'data_size'='2400151608');""" +sql """alter table lineorder modify column lo_orderpriority set stats ('row_count'='600037902', 'ndv'='5', 'num_nulls'='0', 'min_value'='1-URGENT', 'max_value'='5-LOW', 'data_size'='5040804567');""" +sql """alter table dates modify column d_monthnuminyear set stats ('row_count'='2556', 'ndv'='12', 'num_nulls'='0', 'min_value'='1', 'max_value'='12', 'data_size'='10224');""" +sql """alter table supplier modify column s_name set stats ('row_count'='200000', 'ndv'='201596', 'num_nulls'='0', 'min_value'='Supplier#000000001', 'max_value'='Supplier#000200000', 'data_size'='3600000');""" +sql """alter table supplier modify column s_region set stats ('row_count'='200000', 'ndv'='5', 'num_nulls'='0', 'min_value'='AFRICA', 'max_value'='MIDDLE EAST', 'data_size'='1360337');""" + + +} diff --git a/regression-test/suites/nereids_ssb_shape_sf100_p0/shape/flat.groovy b/regression-test/suites/nereids_ssb_shape_sf100_p0/shape/flat.groovy new file mode 100644 index 00000000000..52eb547ab97 --- /dev/null +++ b/regression-test/suites/nereids_ssb_shape_sf100_p0/shape/flat.groovy @@ -0,0 +1,103 @@ +/* + * 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("q1.1") { + String db = context.config.getDbNameByFile(new File(context.file.parent)) + sql "use ${db}" + sql 'set enable_nereids_planner=true' + sql 'set enable_fallback_to_original_planner=false' + sql 'set exec_mem_limit=21G' + sql 'SET enable_pipeline_engine = true' + sql 'set parallel_pipeline_task_num=8' + +sql 'set be_number_for_test=3' +sql 'set enable_runtime_filter_prune=false' +sql 'set runtime_filter_type=8' + + + qt_select """ + explain shape plan + SELECT + LO_ORDERDATE, + LO_ORDERKEY, + LO_LINENUMBER, + LO_CUSTKEY, + LO_PARTKEY, + LO_SUPPKEY, + LO_ORDERPRIORITY, + LO_SHIPPRIORITY, + LO_QUANTITY, + LO_EXTENDEDPRICE, + LO_ORDTOTALPRICE, + LO_DISCOUNT, + LO_REVENUE, + LO_SUPPLYCOST, + LO_TAX, + LO_COMMITDATE, + LO_SHIPMODE, + C_NAME, + C_ADDRESS, + C_CITY, + C_NATION, + C_REGION, + C_PHONE, + C_MKTSEGMENT, + S_NAME, + S_ADDRESS, + S_CITY, + S_NATION, + S_REGION, + S_PHONE, + P_NAME, + P_MFGR, + P_CATEGORY, + P_BRAND, + P_COLOR, + P_TYPE, + P_SIZE, + P_CONTAINER + FROM ( + SELECT + lo_orderkey, + lo_linenumber, + lo_custkey, + lo_partkey, + lo_suppkey, + lo_orderdate, + lo_orderpriority, + lo_shippriority, + lo_quantity, + lo_extendedprice, + lo_ordtotalprice, + lo_discount, + lo_revenue, + lo_supplycost, + lo_tax, + lo_commitdate, + lo_shipmode + FROM lineorder + ) l + INNER JOIN customer c + ON (c.c_custkey = l.lo_custkey) + INNER JOIN supplier s + ON (s.s_suppkey = l.lo_suppkey) + INNER JOIN part p + ON (p.p_partkey = l.lo_partkey); + """ +} \ No newline at end of file diff --git a/regression-test/suites/nereids_ssb_shape_sf100_p0/shape/q1.1.groovy b/regression-test/suites/nereids_ssb_shape_sf100_p0/shape/q1.1.groovy new file mode 100644 index 00000000000..e3f215cb505 --- /dev/null +++ b/regression-test/suites/nereids_ssb_shape_sf100_p0/shape/q1.1.groovy @@ -0,0 +1,44 @@ +/* + * 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("q1.1") { + String db = context.config.getDbNameByFile(new File(context.file.parent)) + sql "use ${db}" + sql 'set enable_nereids_planner=true' + sql 'set enable_fallback_to_original_planner=false' + sql 'set exec_mem_limit=21G' + sql 'SET enable_pipeline_engine = true' + sql 'set parallel_pipeline_task_num=8' + +sql 'set be_number_for_test=3' +sql 'set enable_runtime_filter_prune=false' +sql 'set runtime_filter_type=8' + + + qt_select """ + explain shape plan + SELECT SUM(lo_extendedprice * lo_discount) AS REVENUE +FROM lineorder, dates +WHERE + lo_orderdate = d_datekey + AND d_year = 1993 + AND lo_discount BETWEEN 1 AND 3 + AND lo_quantity < 25; + """ +} diff --git a/regression-test/suites/nereids_ssb_shape_sf100_p0/shape/q1.2.groovy b/regression-test/suites/nereids_ssb_shape_sf100_p0/shape/q1.2.groovy new file mode 100644 index 00000000000..ea8b4fbf066 --- /dev/null +++ b/regression-test/suites/nereids_ssb_shape_sf100_p0/shape/q1.2.groovy @@ -0,0 +1,44 @@ +/* + * 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("q1.2") { + String db = context.config.getDbNameByFile(new File(context.file.parent)) + sql "use ${db}" + sql 'set enable_nereids_planner=true' + sql 'set enable_fallback_to_original_planner=false' + sql 'set exec_mem_limit=21G' + sql 'SET enable_pipeline_engine = true' + sql 'set parallel_pipeline_task_num=8' + +sql 'set be_number_for_test=3' +sql 'set enable_runtime_filter_prune=false' +sql 'set runtime_filter_type=8' + + + qt_select """ + explain shape plan + SELECT SUM(lo_extendedprice * lo_discount) AS REVENUE +FROM lineorder, dates +WHERE + lo_orderdate = d_datekey + AND d_yearmonth = 'Jan1994' + AND lo_discount BETWEEN 4 AND 6 + AND lo_quantity BETWEEN 26 AND 35; + """ +} diff --git a/regression-test/suites/nereids_ssb_shape_sf100_p0/shape/q1.3.groovy b/regression-test/suites/nereids_ssb_shape_sf100_p0/shape/q1.3.groovy new file mode 100644 index 00000000000..826475f42c2 --- /dev/null +++ b/regression-test/suites/nereids_ssb_shape_sf100_p0/shape/q1.3.groovy @@ -0,0 +1,46 @@ +/* + * 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("q1.3") { + String db = context.config.getDbNameByFile(new File(context.file.parent)) + sql "use ${db}" + sql 'set enable_nereids_planner=true' + sql 'set enable_fallback_to_original_planner=false' + sql 'set exec_mem_limit=21G' + sql 'SET enable_pipeline_engine = true' + sql 'set parallel_pipeline_task_num=8' + +sql 'set be_number_for_test=3' +sql 'set enable_runtime_filter_prune=false' +sql 'set runtime_filter_type=8' + + + qt_select """ + explain shape plan + SELECT + SUM(lo_extendedprice * lo_discount) AS REVENUE +FROM lineorder, dates +WHERE + lo_orderdate = d_datekey + AND d_weeknuminyear = 6 + AND d_year = 1994 + AND lo_discount BETWEEN 5 AND 7 + AND lo_quantity BETWEEN 26 AND 35; + """ +} diff --git a/regression-test/suites/nereids_ssb_shape_sf100_p0/shape/q2.1.groovy b/regression-test/suites/nereids_ssb_shape_sf100_p0/shape/q2.1.groovy new file mode 100644 index 00000000000..013a259d9c3 --- /dev/null +++ b/regression-test/suites/nereids_ssb_shape_sf100_p0/shape/q2.1.groovy @@ -0,0 +1,47 @@ +/* + * 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("q2.1") { + String db = context.config.getDbNameByFile(new File(context.file.parent)) + sql "use ${db}" + sql 'set enable_nereids_planner=true' + sql 'set enable_fallback_to_original_planner=false' + sql 'set exec_mem_limit=21G' + sql 'SET enable_pipeline_engine = true' + sql 'set parallel_pipeline_task_num=8' + +sql 'set be_number_for_test=3' +sql 'set enable_runtime_filter_prune=false' +sql 'set runtime_filter_type=8' + + + qt_select """ + explain shape plan + SELECT SUM(lo_revenue), d_year, p_brand +FROM lineorder, dates, part, supplier +WHERE + lo_orderdate = d_datekey + AND lo_partkey = p_partkey + AND lo_suppkey = s_suppkey + AND p_category = 'MFGR#12' + AND s_region = 'AMERICA' +GROUP BY d_year, p_brand +ORDER BY p_brand; + """ +} diff --git a/regression-test/suites/nereids_ssb_shape_sf100_p0/shape/q2.2.groovy b/regression-test/suites/nereids_ssb_shape_sf100_p0/shape/q2.2.groovy new file mode 100644 index 00000000000..ea44def5eb3 --- /dev/null +++ b/regression-test/suites/nereids_ssb_shape_sf100_p0/shape/q2.2.groovy @@ -0,0 +1,47 @@ +/* + * 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("q2.2") { + String db = context.config.getDbNameByFile(new File(context.file.parent)) + sql "use ${db}" + sql 'set enable_nereids_planner=true' + sql 'set enable_fallback_to_original_planner=false' + sql 'set exec_mem_limit=21G' + sql 'SET enable_pipeline_engine = true' + sql 'set parallel_pipeline_task_num=8' + +sql 'set be_number_for_test=3' +sql 'set enable_runtime_filter_prune=false' +sql 'set runtime_filter_type=8' + + + qt_select """ + explain shape plan +SELECT SUM(lo_revenue), d_year, p_brand +FROM lineorder, dates, part, supplier +WHERE + lo_orderdate = d_datekey + AND lo_partkey = p_partkey + AND lo_suppkey = s_suppkey + AND p_brand BETWEEN 'MFGR#2221' AND 'MFGR#2228' + AND s_region = 'ASIA' +GROUP BY d_year, p_brand +ORDER BY d_year, p_brand; + """ +} diff --git a/regression-test/suites/nereids_ssb_shape_sf100_p0/shape/q2.3.groovy b/regression-test/suites/nereids_ssb_shape_sf100_p0/shape/q2.3.groovy new file mode 100644 index 00000000000..12f51e562fd --- /dev/null +++ b/regression-test/suites/nereids_ssb_shape_sf100_p0/shape/q2.3.groovy @@ -0,0 +1,47 @@ +/* + * 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("q2.3") { + String db = context.config.getDbNameByFile(new File(context.file.parent)) + sql "use ${db}" + sql 'set enable_nereids_planner=true' + sql 'set enable_fallback_to_original_planner=false' + sql 'set exec_mem_limit=21G' + sql 'SET enable_pipeline_engine = true' + sql 'set parallel_pipeline_task_num=8' + +sql 'set be_number_for_test=3' +sql 'set enable_runtime_filter_prune=false' +sql 'set runtime_filter_type=8' + + + qt_select """ + explain shape plan +SELECT SUM(lo_revenue), d_year, p_brand +FROM lineorder, dates, part, supplier +WHERE + lo_orderdate = d_datekey + AND lo_partkey = p_partkey + AND lo_suppkey = s_suppkey + AND p_brand = 'MFGR#2239' + AND s_region = 'EUROPE' +GROUP BY d_year, p_brand +ORDER BY d_year, p_brand; + """ +} diff --git a/regression-test/suites/nereids_ssb_shape_sf100_p0/shape/q3.1.groovy b/regression-test/suites/nereids_ssb_shape_sf100_p0/shape/q3.1.groovy new file mode 100644 index 00000000000..f563b90efce --- /dev/null +++ b/regression-test/suites/nereids_ssb_shape_sf100_p0/shape/q3.1.groovy @@ -0,0 +1,53 @@ +/* + * 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("q3.1") { + String db = context.config.getDbNameByFile(new File(context.file.parent)) + sql "use ${db}" + sql 'set enable_nereids_planner=true' + sql 'set enable_fallback_to_original_planner=false' + sql 'set exec_mem_limit=21G' + sql 'SET enable_pipeline_engine = true' + sql 'set parallel_pipeline_task_num=8' + +sql 'set be_number_for_test=3' +sql 'set enable_runtime_filter_prune=false' +sql 'set runtime_filter_type=8' + + + qt_select """ + explain shape plan + SELECT + c_nation, + s_nation, + d_year, + SUM(lo_revenue) AS REVENUE +FROM customer, lineorder, supplier, dates +WHERE + lo_custkey = c_custkey + AND lo_suppkey = s_suppkey + AND lo_orderdate = d_datekey + AND c_region = 'ASIA' + AND s_region = 'ASIA' + AND d_year >= 1992 + AND d_year <= 1997 +GROUP BY c_nation, s_nation, d_year +ORDER BY d_year ASC, REVENUE DESC; + """ +} diff --git a/regression-test/suites/nereids_ssb_shape_sf100_p0/shape/q3.2.groovy b/regression-test/suites/nereids_ssb_shape_sf100_p0/shape/q3.2.groovy new file mode 100644 index 00000000000..87ac269313d --- /dev/null +++ b/regression-test/suites/nereids_ssb_shape_sf100_p0/shape/q3.2.groovy @@ -0,0 +1,53 @@ +/* + * 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("q3.2") { + String db = context.config.getDbNameByFile(new File(context.file.parent)) + sql "use ${db}" + sql 'set enable_nereids_planner=true' + sql 'set enable_fallback_to_original_planner=false' + sql 'set exec_mem_limit=21G' + sql 'SET enable_pipeline_engine = true' + sql 'set parallel_pipeline_task_num=8' + +sql 'set be_number_for_test=3' +sql 'set enable_runtime_filter_prune=false' +sql 'set runtime_filter_type=8' + + + qt_select """ + explain shape plan + SELECT + c_city, + s_city, + d_year, + SUM(lo_revenue) AS REVENUE +FROM customer, lineorder, supplier, dates +WHERE + lo_custkey = c_custkey + AND lo_suppkey = s_suppkey + AND lo_orderdate = d_datekey + AND c_nation = 'UNITED STATES' + AND s_nation = 'UNITED STATES' + AND d_year >= 1992 + AND d_year <= 1997 +GROUP BY c_city, s_city, d_year +ORDER BY d_year ASC, REVENUE DESC; + """ +} diff --git a/regression-test/suites/nereids_ssb_shape_sf100_p0/shape/q3.3.groovy b/regression-test/suites/nereids_ssb_shape_sf100_p0/shape/q3.3.groovy new file mode 100644 index 00000000000..579830627fb --- /dev/null +++ b/regression-test/suites/nereids_ssb_shape_sf100_p0/shape/q3.3.groovy @@ -0,0 +1,59 @@ +/* + * 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("q3.3") { + String db = context.config.getDbNameByFile(new File(context.file.parent)) + sql "use ${db}" + sql 'set enable_nereids_planner=true' + sql 'set enable_fallback_to_original_planner=false' + sql 'set exec_mem_limit=21G' + sql 'SET enable_pipeline_engine = true' + sql 'set parallel_pipeline_task_num=8' + +sql 'set be_number_for_test=3' +sql 'set enable_runtime_filter_prune=false' +sql 'set runtime_filter_type=8' + + + qt_select """ + explain shape plan + SELECT + c_city, + s_city, + d_year, + SUM(lo_revenue) AS REVENUE +FROM customer, lineorder, supplier, dates +WHERE + lo_custkey = c_custkey + AND lo_suppkey = s_suppkey + AND lo_orderdate = d_datekey + AND ( + c_city = 'UNITED KI1' + OR c_city = 'UNITED KI5' + ) + AND ( + s_city = 'UNITED KI1' + OR s_city = 'UNITED KI5' + ) + AND d_year >= 1992 + AND d_year <= 1997 +GROUP BY c_city, s_city, d_year +ORDER BY d_year ASC, REVENUE DESC; +""" +} diff --git a/regression-test/suites/nereids_ssb_shape_sf100_p0/shape/q3.4.groovy b/regression-test/suites/nereids_ssb_shape_sf100_p0/shape/q3.4.groovy new file mode 100644 index 00000000000..faae056f7dd --- /dev/null +++ b/regression-test/suites/nereids_ssb_shape_sf100_p0/shape/q3.4.groovy @@ -0,0 +1,58 @@ +/* + * 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("q3.4") { + String db = context.config.getDbNameByFile(new File(context.file.parent)) + sql "use ${db}" + sql 'set enable_nereids_planner=true' + sql 'set enable_fallback_to_original_planner=false' + sql 'set exec_mem_limit=21G' + sql 'SET enable_pipeline_engine = true' + sql 'set parallel_pipeline_task_num=8' + +sql 'set be_number_for_test=3' +sql 'set enable_runtime_filter_prune=false' +sql 'set runtime_filter_type=8' + + + qt_select """ + explain shape plan + SELECT + c_city, + s_city, + d_year, + SUM(lo_revenue) AS REVENUE +FROM customer, lineorder, supplier, dates +WHERE + lo_custkey = c_custkey + AND lo_suppkey = s_suppkey + AND lo_orderdate = d_datekey + AND ( + c_city = 'UNITED KI1' + OR c_city = 'UNITED KI5' + ) + AND ( + s_city = 'UNITED KI1' + OR s_city = 'UNITED KI5' + ) + AND d_yearmonth = 'Dec1997' +GROUP BY c_city, s_city, d_year +ORDER BY d_year ASC, REVENUE DESC; + """ +} diff --git a/regression-test/suites/nereids_ssb_shape_sf100_p0/shape/q4.1.groovy b/regression-test/suites/nereids_ssb_shape_sf100_p0/shape/q4.1.groovy new file mode 100644 index 00000000000..0917dc84550 --- /dev/null +++ b/regression-test/suites/nereids_ssb_shape_sf100_p0/shape/q4.1.groovy @@ -0,0 +1,55 @@ +/* + * 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("q4.1") { + String db = context.config.getDbNameByFile(new File(context.file.parent)) + sql "use ${db}" + sql 'set enable_nereids_planner=true' + sql 'set enable_fallback_to_original_planner=false' + sql 'set exec_mem_limit=21G' + sql 'SET enable_pipeline_engine = true' + sql 'set parallel_pipeline_task_num=8' + +sql 'set be_number_for_test=3' +sql 'set enable_runtime_filter_prune=false' +sql 'set runtime_filter_type=8' + + + qt_select """ + explain shape plan + SELECT + d_year, + c_nation, + SUM(lo_revenue - lo_supplycost) AS PROFIT +FROM dates, customer, supplier, part, lineorder +WHERE + lo_custkey = c_custkey + AND lo_suppkey = s_suppkey + AND lo_partkey = p_partkey + AND lo_orderdate = d_datekey + AND c_region = 'AMERICA' + AND s_region = 'AMERICA' + AND ( + p_mfgr = 'MFGR#1' + OR p_mfgr = 'MFGR#2' + ) +GROUP BY d_year, c_nation +ORDER BY d_year, c_nation; + """ +} diff --git a/regression-test/suites/nereids_ssb_shape_sf100_p0/shape/q4.2.groovy b/regression-test/suites/nereids_ssb_shape_sf100_p0/shape/q4.2.groovy new file mode 100644 index 00000000000..90d0006cb57 --- /dev/null +++ b/regression-test/suites/nereids_ssb_shape_sf100_p0/shape/q4.2.groovy @@ -0,0 +1,60 @@ +/* + * 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("q4.2") { + String db = context.config.getDbNameByFile(new File(context.file.parent)) + sql "use ${db}" + sql 'set enable_nereids_planner=true' + sql 'set enable_fallback_to_original_planner=false' + sql 'set exec_mem_limit=21G' + sql 'SET enable_pipeline_engine = true' + sql 'set parallel_pipeline_task_num=8' + +sql 'set be_number_for_test=3' +sql 'set enable_runtime_filter_prune=false' +sql 'set runtime_filter_type=8' + + + qt_select """ + explain shape plan + SELECT + d_year, + s_nation, + p_category, + SUM(lo_revenue - lo_supplycost) AS PROFIT +FROM dates, customer, supplier, part, lineorder +WHERE + lo_custkey = c_custkey + AND lo_suppkey = s_suppkey + AND lo_partkey = p_partkey + AND lo_orderdate = d_datekey + AND c_region = 'AMERICA' + AND s_region = 'AMERICA' + AND ( + d_year = 1997 + OR d_year = 1998 + ) + AND ( + p_mfgr = 'MFGR#1' + OR p_mfgr = 'MFGR#2' + ) +GROUP BY d_year, s_nation, p_category +ORDER BY d_year, s_nation, p_category; + """ +} diff --git a/regression-test/suites/nereids_ssb_shape_sf100_p0/shape/q4.3.groovy b/regression-test/suites/nereids_ssb_shape_sf100_p0/shape/q4.3.groovy new file mode 100644 index 00000000000..0c511a9c44f --- /dev/null +++ b/regression-test/suites/nereids_ssb_shape_sf100_p0/shape/q4.3.groovy @@ -0,0 +1,56 @@ +/* + * 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("q4.3") { + String db = context.config.getDbNameByFile(new File(context.file.parent)) + sql "use ${db}" + sql 'set enable_nereids_planner=true' + sql 'set enable_fallback_to_original_planner=false' + sql 'set exec_mem_limit=21G' + sql 'SET enable_pipeline_engine = true' + sql 'set parallel_pipeline_task_num=8' + +sql 'set be_number_for_test=3' +sql 'set enable_runtime_filter_prune=false' +sql 'set runtime_filter_type=8' + + + qt_select """ + explain shape plan + SELECT + d_year, + s_city, + p_brand, + SUM(lo_revenue - lo_supplycost) AS PROFIT +FROM dates, customer, supplier, part, lineorder +WHERE + lo_custkey = c_custkey + AND lo_suppkey = s_suppkey + AND lo_partkey = p_partkey + AND lo_orderdate = d_datekey + AND s_nation = 'UNITED STATES' + AND ( + d_year = 1997 + OR d_year = 1998 + ) + AND p_category = 'MFGR#14' +GROUP BY d_year, s_city, p_brand +ORDER BY d_year, s_city, p_brand; + """ +} --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org