From 08fb91f1615942c2be787689ffa806dad4249a13 Mon Sep 17 00:00:00 2001 From: yiguolei <676222867@qq.com> Date: Wed, 4 Sep 2024 17:55:25 +0800 Subject: [PATCH 1/3] Revert "[cherry-pick](branch-2.1) Fix `enable_mow_light_delete` default value" (#40359) Reverts apache/doris#40283 --- .../org/apache/doris/common/util/PropertyAnalyzer.java | 7 +++---- .../java/org/apache/doris/datasource/InternalCatalog.java | 3 +-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/common/util/PropertyAnalyzer.java b/fe/fe-core/src/main/java/org/apache/doris/common/util/PropertyAnalyzer.java index dd39b12a18e220..d1a710bcf9fe56 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/common/util/PropertyAnalyzer.java +++ b/fe/fe-core/src/main/java/org/apache/doris/common/util/PropertyAnalyzer.java @@ -1311,15 +1311,14 @@ public static boolean analyzeUniqueKeyMergeOnWrite(Map propertie throw new AnalysisException(PropertyAnalyzer.ENABLE_UNIQUE_KEY_MERGE_ON_WRITE + " must be `true` or `false`"); } - public static boolean analyzeEnableDeleteOnDeletePredicate(Map properties, - boolean enableUniqueKeyMergeOnWrite) + public static boolean analyzeEnableDeleteOnDeletePredicate(Map properties) throws AnalysisException { if (properties == null || properties.isEmpty()) { - return enableUniqueKeyMergeOnWrite ? Config.enable_mow_light_delete : false; + return false; } String value = properties.get(PropertyAnalyzer.PROPERTIES_ENABLE_MOW_LIGHT_DELETE); if (value == null) { - return enableUniqueKeyMergeOnWrite ? Config.enable_mow_light_delete : false; + return false; } properties.remove(PropertyAnalyzer.PROPERTIES_ENABLE_MOW_LIGHT_DELETE); if (value.equals("true")) { diff --git a/fe/fe-core/src/main/java/org/apache/doris/datasource/InternalCatalog.java b/fe/fe-core/src/main/java/org/apache/doris/datasource/InternalCatalog.java index 46b1c44fa23bbc..1fb8826903bcb7 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/datasource/InternalCatalog.java +++ b/fe/fe-core/src/main/java/org/apache/doris/datasource/InternalCatalog.java @@ -2498,8 +2498,7 @@ private boolean createOlapTable(Database db, CreateTableStmt stmt) throws UserEx boolean enableDeleteOnDeletePredicate = false; try { - enableDeleteOnDeletePredicate = PropertyAnalyzer.analyzeEnableDeleteOnDeletePredicate(properties, - enableUniqueKeyMergeOnWrite); + enableDeleteOnDeletePredicate = PropertyAnalyzer.analyzeEnableDeleteOnDeletePredicate(properties); } catch (AnalysisException e) { throw new DdlException(e.getMessage()); } From cc20ecd738b56bd5cc7611dda5d57e75c441741e Mon Sep 17 00:00:00 2001 From: Luwei <814383175@qq.com> Date: Thu, 5 Sep 2024 00:01:03 +0800 Subject: [PATCH 2/3] Revert "[fix](compaction) fix the longest continuous rowsets cannot be selected when missing rowsets (#38728) (#39262)" (#40375) This reverts commit c9949f24e5c15e9529285f0e99b7ffdb1095558b. This pr may increase the probability of full clone failure, so revert it first. --- be/src/olap/compaction.cpp | 20 +- be/src/olap/cumulative_compaction.cpp | 7 +- be/test/olap/cumulative_compaction_test.cpp | 274 -------------------- 3 files changed, 6 insertions(+), 295 deletions(-) delete mode 100644 be/test/olap/cumulative_compaction_test.cpp diff --git a/be/src/olap/compaction.cpp b/be/src/olap/compaction.cpp index 749f81893988bd..fa2d89352be985 100644 --- a/be/src/olap/compaction.cpp +++ b/be/src/olap/compaction.cpp @@ -1132,14 +1132,8 @@ Status Compaction::find_longest_consecutive_version(std::vector if (rowsets->empty()) { return Status::OK(); } - RowsetSharedPtr prev_rowset = rowsets->front(); size_t i = 1; - int max_start = 0; - int max_length = 1; - - int start = 0; - int length = 1; for (; i < rowsets->size(); ++i) { RowsetSharedPtr rowset = (*rowsets)[i]; if (rowset->start_version() != prev_rowset->end_version() + 1) { @@ -1147,20 +1141,12 @@ Status Compaction::find_longest_consecutive_version(std::vector missing_version->push_back(prev_rowset->version()); missing_version->push_back(rowset->version()); } - start = i; - length = 1; - } else { - length++; + break; } - - if (length > max_length) { - max_start = start; - max_length = length; - } - prev_rowset = rowset; } - *rowsets = {rowsets->begin() + max_start, rowsets->begin() + max_start + max_length}; + + rowsets->resize(i); return Status::OK(); } diff --git a/be/src/olap/cumulative_compaction.cpp b/be/src/olap/cumulative_compaction.cpp index d7fc4da44739e9..04504432f195fa 100644 --- a/be/src/olap/cumulative_compaction.cpp +++ b/be/src/olap/cumulative_compaction.cpp @@ -111,11 +111,10 @@ Status CumulativeCompaction::pick_rowsets_to_compact() { std::vector missing_versions; RETURN_IF_ERROR(find_longest_consecutive_version(&candidate_rowsets, &missing_versions)); if (!missing_versions.empty()) { - DCHECK(missing_versions.size() % 2 == 0); + DCHECK(missing_versions.size() == 2); LOG(WARNING) << "There are missed versions among rowsets. " - << "total missed version size: " << missing_versions.size() / 2 - << " first missed version prev rowset verison=" << missing_versions[0] - << ", first missed version next rowset version=" << missing_versions[1] + << "prev rowset verison=" << missing_versions[0] + << ", next rowset version=" << missing_versions[1] << ", tablet=" << _tablet->tablet_id(); } diff --git a/be/test/olap/cumulative_compaction_test.cpp b/be/test/olap/cumulative_compaction_test.cpp deleted file mode 100644 index a0d3d99093d3c1..00000000000000 --- a/be/test/olap/cumulative_compaction_test.cpp +++ /dev/null @@ -1,274 +0,0 @@ -// 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. - -#include "olap/cumulative_compaction.h" - -#include -#include -#include -#include -#include - -#include -#include - -#include "common/status.h" -#include "gtest/gtest_pred_impl.h" -#include "io/fs/local_file_system.h" -#include "olap/cumulative_compaction_policy.h" -#include "olap/data_dir.h" -#include "olap/rowset/rowset_factory.h" -#include "olap/storage_engine.h" -#include "olap/tablet_manager.h" -#include "util/threadpool.h" - -namespace doris { -using namespace config; - -class CumulativeCompactionTest : public testing::Test { -public: - virtual void SetUp() {} - - virtual void TearDown() {} -}; - -static RowsetSharedPtr create_rowset(Version version, int num_segments, bool overlapping, - int data_size) { - auto rs_meta = std::make_shared(); - rs_meta->set_rowset_type(BETA_ROWSET); // important - rs_meta->_rowset_meta_pb.set_start_version(version.first); - rs_meta->_rowset_meta_pb.set_end_version(version.second); - rs_meta->set_num_segments(num_segments); - rs_meta->set_segments_overlap(overlapping ? OVERLAPPING : NONOVERLAPPING); - rs_meta->set_total_disk_size(data_size); - RowsetSharedPtr rowset; - Status st = RowsetFactory::create_rowset(nullptr, "", std::move(rs_meta), &rowset); - if (!st.ok()) { - return nullptr; - } - return rowset; -} - -TEST_F(CumulativeCompactionTest, TestConsecutiveVersion) { - EngineOptions options; - StorageEngine storage_engine(options); - //TabletSharedPtr tablet; - - TabletMetaSharedPtr tablet_meta; - tablet_meta.reset(new TabletMeta(1, 2, 15673, 15674, 4, 5, TTabletSchema(), 6, {{7, 8}}, - UniqueId(9, 10), TTabletType::TABLET_TYPE_DISK, - TCompressionType::LZ4F)); - TabletSharedPtr tablet( - new Tablet(storage_engine, tablet_meta, nullptr, CUMULATIVE_SIZE_BASED_POLICY)); - - CumulativeCompaction cumu_compaction(tablet); - - { - std::vector rowsets; - for (int i = 2; i < 10; ++i) { - RowsetSharedPtr rs = create_rowset({i, i}, 1, false, 1024); - rowsets.push_back(rs); - } - std::vector missing_version; - Status st = cumu_compaction.find_longest_consecutive_version(&rowsets, &missing_version); - EXPECT_TRUE(st.OK()); - EXPECT_EQ(rowsets.size(), 8); - EXPECT_EQ(rowsets.front()->start_version(), 2); - EXPECT_EQ(rowsets.front()->end_version(), 2); - - EXPECT_EQ(rowsets.back()->start_version(), 9); - EXPECT_EQ(rowsets.back()->end_version(), 9); - - EXPECT_EQ(missing_version.size(), 0); - } - - { - std::vector rowsets; - for (int i = 2; i <= 4; ++i) { - RowsetSharedPtr rs = create_rowset({i, i}, 1, false, 1024); - rowsets.push_back(rs); - } - - for (int i = 6; i <= 10; ++i) { - RowsetSharedPtr rs = create_rowset({i, i}, 1, false, 1024); - rowsets.push_back(rs); - } - - for (int i = 12; i <= 13; ++i) { - RowsetSharedPtr rs = create_rowset({i, i}, 1, false, 1024); - rowsets.push_back(rs); - } - - std::vector missing_version; - Status st = cumu_compaction.find_longest_consecutive_version(&rowsets, &missing_version); - EXPECT_TRUE(st.OK()); - - EXPECT_EQ(rowsets.size(), 5); - EXPECT_EQ(rowsets.front()->start_version(), 6); - EXPECT_EQ(rowsets.front()->end_version(), 6); - EXPECT_EQ(rowsets.back()->start_version(), 10); - EXPECT_EQ(rowsets.back()->end_version(), 10); - - EXPECT_EQ(missing_version.size(), 4); - EXPECT_EQ(missing_version[0].first, 4); - EXPECT_EQ(missing_version[0].second, 4); - EXPECT_EQ(missing_version[1].first, 6); - EXPECT_EQ(missing_version[1].second, 6); - EXPECT_EQ(missing_version[2].first, 10); - EXPECT_EQ(missing_version[2].second, 10); - EXPECT_EQ(missing_version[3].first, 12); - EXPECT_EQ(missing_version[3].second, 12); - } - - { - std::vector rowsets; - for (int i = 2; i <= 2; ++i) { - RowsetSharedPtr rs = create_rowset({i, i}, 1, false, 1024); - rowsets.push_back(rs); - } - - for (int i = 4; i <= 4; ++i) { - RowsetSharedPtr rs = create_rowset({i, i}, 1, false, 1024); - rowsets.push_back(rs); - } - - std::vector missing_version; - Status st = cumu_compaction.find_longest_consecutive_version(&rowsets, &missing_version); - EXPECT_TRUE(st.OK()); - - EXPECT_EQ(rowsets.size(), 1); - EXPECT_EQ(rowsets.front()->start_version(), 2); - EXPECT_EQ(rowsets.front()->end_version(), 2); - EXPECT_EQ(rowsets.back()->start_version(), 2); - EXPECT_EQ(rowsets.back()->end_version(), 2); - - EXPECT_EQ(missing_version.size(), 2); - EXPECT_EQ(missing_version[0].first, 2); - EXPECT_EQ(missing_version[0].second, 2); - EXPECT_EQ(missing_version[1].first, 4); - EXPECT_EQ(missing_version[1].second, 4); - } - - { - std::vector rowsets; - RowsetSharedPtr rs = create_rowset({2, 3}, 1, false, 1024); - rowsets.push_back(rs); - rs = create_rowset({4, 5}, 1, false, 1024); - rowsets.push_back(rs); - - rs = create_rowset({9, 11}, 1, false, 1024); - rowsets.push_back(rs); - rs = create_rowset({12, 13}, 1, false, 1024); - rowsets.push_back(rs); - - std::vector missing_version; - Status st = cumu_compaction.find_longest_consecutive_version(&rowsets, &missing_version); - EXPECT_TRUE(st.OK()); - - EXPECT_EQ(rowsets.size(), 2); - EXPECT_EQ(rowsets.front()->start_version(), 2); - EXPECT_EQ(rowsets.front()->end_version(), 3); - EXPECT_EQ(rowsets.back()->start_version(), 4); - EXPECT_EQ(rowsets.back()->end_version(), 5); - - EXPECT_EQ(missing_version.size(), 2); - EXPECT_EQ(missing_version[0].first, 4); - EXPECT_EQ(missing_version[0].second, 5); - EXPECT_EQ(missing_version[1].first, 9); - EXPECT_EQ(missing_version[1].second, 11); - } - - { - std::vector rowsets; - for (int i = 2; i <= 2; ++i) { - RowsetSharedPtr rs = create_rowset({i, i}, 1, false, 1024); - rowsets.push_back(rs); - } - - std::vector missing_version; - Status st = cumu_compaction.find_longest_consecutive_version(&rowsets, &missing_version); - EXPECT_TRUE(st.OK()); - - EXPECT_EQ(rowsets.size(), 1); - EXPECT_EQ(rowsets.front()->start_version(), 2); - EXPECT_EQ(rowsets.front()->end_version(), 2); - - EXPECT_EQ(rowsets.back()->start_version(), 2); - EXPECT_EQ(rowsets.back()->end_version(), 2); - EXPECT_EQ(missing_version.size(), 0); - } - - { - std::vector rowsets; - for (int i = 2; i <= 2; ++i) { - RowsetSharedPtr rs = create_rowset({i, i}, 1, false, 1024); - rowsets.push_back(rs); - } - - std::vector missing_version; - Status st = cumu_compaction.find_longest_consecutive_version(&rowsets, &missing_version); - EXPECT_TRUE(st.OK()); - - EXPECT_EQ(rowsets.size(), 1); - EXPECT_EQ(rowsets.front()->start_version(), 2); - EXPECT_EQ(rowsets.front()->end_version(), 2); - - EXPECT_EQ(rowsets.back()->start_version(), 2); - EXPECT_EQ(rowsets.back()->end_version(), 2); - EXPECT_EQ(missing_version.size(), 0); - } - - { - std::vector rowsets; - for (int i = 2; i <= 4; ++i) { - RowsetSharedPtr rs = create_rowset({i, i}, 1, false, 1024); - rowsets.push_back(rs); - } - - for (int i = 6; i <= 10; ++i) { - RowsetSharedPtr rs = create_rowset({i, i}, 1, false, 1024); - rowsets.push_back(rs); - } - - for (int i = 12; i <= 20; ++i) { - RowsetSharedPtr rs = create_rowset({i, i}, 1, false, 1024); - rowsets.push_back(rs); - } - - std::vector missing_version; - Status st = cumu_compaction.find_longest_consecutive_version(&rowsets, &missing_version); - EXPECT_TRUE(st.OK()); - - EXPECT_EQ(rowsets.size(), 9); - EXPECT_EQ(rowsets.front()->start_version(), 12); - EXPECT_EQ(rowsets.front()->end_version(), 12); - EXPECT_EQ(rowsets.back()->start_version(), 20); - EXPECT_EQ(rowsets.back()->end_version(), 20); - - EXPECT_EQ(missing_version.size(), 4); - EXPECT_EQ(missing_version[0].first, 4); - EXPECT_EQ(missing_version[0].second, 4); - EXPECT_EQ(missing_version[1].first, 6); - EXPECT_EQ(missing_version[1].second, 6); - EXPECT_EQ(missing_version[2].first, 10); - EXPECT_EQ(missing_version[2].second, 10); - EXPECT_EQ(missing_version[3].first, 12); - EXPECT_EQ(missing_version[3].second, 12); - } -} - -} // namespace doris From c6771da240d5ca55d8c73320781f3cfa9ec43adf Mon Sep 17 00:00:00 2001 From: minghong Date: Thu, 5 Sep 2024 08:33:04 +0800 Subject: [PATCH 3/3] [fix](nereids) fix bug for A>n, where A.max is infinity #39936 (#40368) ## Proposed changes pick #39936 Issue Number: close #xxx --- .../doris/nereids/stats/FilterEstimation.java | 4 +- .../doris/statistics/StatisticRange.java | 22 ++- .../nereids/stats/FilterEstimationTest.java | 35 ++++ .../shape/query4.out | 16 +- .../noStatsRfPrune/query11.out | 14 +- .../noStatsRfPrune/query4.out | 28 +-- .../noStatsRfPrune/query74.out | 14 +- .../no_stats_shape/query11.out | 14 +- .../no_stats_shape/query4.out | 28 +-- .../no_stats_shape/query74.out | 14 +- .../rf_prune/query4.out | 24 +-- .../rf_prune/query64.out | 173 +++++++++--------- .../rf_prune/query74.out | 16 +- .../shape/query4.out | 24 +-- .../shape/query74.out | 16 +- 15 files changed, 246 insertions(+), 196 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/stats/FilterEstimation.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/stats/FilterEstimation.java index 047bc9b0dde944..33b7e02b332507 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/stats/FilterEstimation.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/stats/FilterEstimation.java @@ -622,7 +622,9 @@ private Statistics estimateBinaryComparisonFilter(Expression leftExpr, DataType .setMaxExpr(intersectRange.getHighExpr()) .setNdv(intersectRange.getDistinctValues()) .setNumNulls(0); - double sel = leftRange.overlapPercentWith(rightRange); + double sel = leftRange.getDistinctValues() == 0 + ? 1.0 + : intersectRange.getDistinctValues() / leftRange.getDistinctValues(); if (!(dataType instanceof RangeScalable) && (sel != 0.0 && sel != 1.0)) { sel = DEFAULT_INEQUALITY_COEFFICIENT; } diff --git a/fe/fe-core/src/main/java/org/apache/doris/statistics/StatisticRange.java b/fe/fe-core/src/main/java/org/apache/doris/statistics/StatisticRange.java index 7b7b08ab24669d..ca9735b56654b1 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/statistics/StatisticRange.java +++ b/fe/fe-core/src/main/java/org/apache/doris/statistics/StatisticRange.java @@ -124,6 +124,10 @@ public boolean isInfinite() { return Double.isInfinite(low) || Double.isInfinite(high); } + public boolean isOneSideInfinite() { + return isInfinite() && !isBothInfinite(); + } + public boolean isFinite() { return Double.isFinite(low) && Double.isFinite(high); } @@ -175,8 +179,7 @@ public Pair maxPair(double r1, LiteralExpr e1, double r2, L } public StatisticRange cover(StatisticRange other) { - // double newLow = Math.max(low, other.low); - // double newHigh = Math.min(high, other.high); + StatisticRange resultRange; Pair biggerLow = maxPair(low, lowExpr, other.low, other.lowExpr); double newLow = biggerLow.first; LiteralExpr newLowExpr = biggerLow.second; @@ -188,9 +191,18 @@ public StatisticRange cover(StatisticRange other) { double overlapPercentOfLeft = overlapPercentWith(other); double overlapDistinctValuesLeft = overlapPercentOfLeft * distinctValues; double coveredDistinctValues = minExcludeNaN(distinctValues, overlapDistinctValuesLeft); - return new StatisticRange(newLow, newLowExpr, newHigh, newHighExpr, coveredDistinctValues, dataType); + if (this.isBothInfinite() && other.isOneSideInfinite()) { + resultRange = new StatisticRange(newLow, newLowExpr, newHigh, newHighExpr, + distinctValues * INFINITE_TO_INFINITE_RANGE_INTERSECT_OVERLAP_HEURISTIC_FACTOR, + dataType); + } else { + resultRange = new StatisticRange(newLow, newLowExpr, newHigh, newHighExpr, coveredDistinctValues, + dataType); + } + } else { + resultRange = empty(dataType); } - return empty(dataType); + return resultRange; } public StatisticRange union(StatisticRange other) { @@ -241,6 +253,6 @@ public double getDistinctValues() { @Override public String toString() { - return "(" + lowExpr + "," + highExpr + ")"; + return "range=(" + lowExpr + "," + highExpr + "), ndv=" + distinctValues; } } diff --git a/fe/fe-core/src/test/java/org/apache/doris/nereids/stats/FilterEstimationTest.java b/fe/fe-core/src/test/java/org/apache/doris/nereids/stats/FilterEstimationTest.java index d7c44e082cf52e..54843e40b9a49f 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/nereids/stats/FilterEstimationTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/nereids/stats/FilterEstimationTest.java @@ -1365,4 +1365,39 @@ public void testStringRangeColToCol() { Statistics agrtc = new FilterEstimation().estimate(new GreaterThan(a, c), baseStats); Assertions.assertEquals(50, agrtc.getRowCount()); } + + @Test + void testAndWithInfinity() { + Double row = 1000.0; + SlotReference a = new SlotReference("a", new VarcharType(25)); + ColumnStatisticBuilder columnStatisticBuilderA = new ColumnStatisticBuilder() + .setNdv(10) + .setAvgSizeByte(4) + .setNumNulls(0) + .setCount(row); + + SlotReference b = new SlotReference("b", IntegerType.INSTANCE); + ColumnStatisticBuilder columnStatisticBuilderB = new ColumnStatisticBuilder() + .setNdv(488) + .setAvgSizeByte(25) + .setNumNulls(0) + .setCount(row); + StatisticsBuilder statsBuilder = new StatisticsBuilder(); + statsBuilder.setRowCount(row); + statsBuilder.putColumnStatistics(a, columnStatisticBuilderA.build()); + statsBuilder.putColumnStatistics(b, columnStatisticBuilderB.build()); + Expression strGE = new GreaterThanEqual(a, + new org.apache.doris.nereids.trees.expressions.literal.StringLiteral("2024-05-14")); + Statistics strStats = new FilterEstimation().estimate(strGE, statsBuilder.build()); + Assertions.assertEquals(500, strStats.getRowCount()); + + Expression intGE = new GreaterThan(b, new IntegerLiteral(0)); + Statistics intStats = new FilterEstimation().estimate(intGE, statsBuilder.build()); + Assertions.assertEquals(500, intStats.getRowCount()); + + Expression predicate = new And(strGE, intGE); + + Statistics stats = new FilterEstimation().estimate(predicate, statsBuilder.build()); + Assertions.assertEquals(250, stats.getRowCount()); + } } diff --git a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query4.out b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query4.out index 4e38885b431718..8522c6c215d242 100644 --- a/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query4.out +++ b/regression-test/data/nereids_tpcds_shape_sf1000_p0/shape/query4.out @@ -69,18 +69,18 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------------------filter((t_c_firstyear.dyear = 1999) and (t_c_firstyear.sale_type = 'c') and (t_c_firstyear.year_total > 0.000000)) ----------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_c_secyear.customer_id)) otherCondition=() ---------------------------hashJoin[INNER_JOIN] hashCondition=((t_s_secyear.customer_id = t_s_firstyear.customer_id)) otherCondition=() +------------------------hashJoin[INNER_JOIN] hashCondition=((t_s_secyear.customer_id = t_s_firstyear.customer_id)) otherCondition=() +--------------------------PhysicalDistribute[DistributionSpecHash] +----------------------------PhysicalProject +------------------------------filter((t_s_secyear.dyear = 2000) and (t_s_secyear.sale_type = 's')) +--------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +--------------------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_c_secyear.customer_id)) otherCondition=() ----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject ---------------------------------filter((t_s_firstyear.dyear = 1999) and (t_s_firstyear.sale_type = 's') and (t_s_firstyear.year_total > 0.000000)) +--------------------------------filter((t_c_secyear.dyear = 2000) and (t_c_secyear.sale_type = 'c')) ----------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject ---------------------------------filter((t_s_secyear.dyear = 2000) and (t_s_secyear.sale_type = 's')) +--------------------------------filter((t_s_firstyear.dyear = 1999) and (t_s_firstyear.sale_type = 's') and (t_s_firstyear.year_total > 0.000000)) ----------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------------------PhysicalDistribute[DistributionSpecHash] -----------------------------PhysicalProject -------------------------------filter((t_c_secyear.dyear = 2000) and (t_c_secyear.sale_type = 'c')) ---------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query11.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query11.out index 6922272ef0a666..b7c625a6af1ad9 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query11.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query11.out @@ -39,16 +39,12 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject -------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.00), (cast(year_total as DECIMALV3(38, 8)) / year_total), 0.000000) > if((year_total > 0.00), (cast(year_total as DECIMALV3(38, 8)) / year_total), 0.000000))) ---------------PhysicalDistribute[DistributionSpecHash] -----------------PhysicalProject -------------------filter((t_w_secyear.dyear = 2002) and (t_w_secyear.sale_type = 'w')) ---------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=((if((year_total > 0.00), (cast(year_total as DECIMALV3(38, 8)) / year_total), 0.000000) > if((year_total > 0.00), (cast(year_total as DECIMALV3(38, 8)) / year_total), 0.000000))) --------------PhysicalProject -----------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=() +----------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=() ------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject -----------------------filter((t_w_firstyear.dyear = 2001) and (t_w_firstyear.sale_type = 'w') and (t_w_firstyear.year_total > 0.00)) +----------------------filter((t_w_secyear.dyear = 2002) and (t_w_secyear.sale_type = 'w')) ------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ------------------hashJoin[INNER_JOIN] hashCondition=((t_s_secyear.customer_id = t_s_firstyear.customer_id)) otherCondition=() --------------------PhysicalDistribute[DistributionSpecHash] @@ -59,4 +55,8 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----------------------PhysicalProject ------------------------filter((t_s_firstyear.dyear = 2001) and (t_s_firstyear.sale_type = 's') and (t_s_firstyear.year_total > 0.00)) --------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +--------------PhysicalDistribute[DistributionSpecHash] +----------------PhysicalProject +------------------filter((t_w_firstyear.dyear = 2001) and (t_w_firstyear.sale_type = 'w') and (t_w_firstyear.year_total > 0.00)) +--------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query4.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query4.out index e1934aa4667474..5936085dc153f1 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query4.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query4.out @@ -51,28 +51,20 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject -------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL) > if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL))) ---------------PhysicalDistribute[DistributionSpecHash] -----------------PhysicalProject -------------------filter((t_w_secyear.dyear = 2000) and (t_w_secyear.sale_type = 'w')) ---------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=((if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL) > if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL))) --------------PhysicalProject -----------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=() +----------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=() ------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject -----------------------filter((t_w_firstyear.dyear = 1999) and (t_w_firstyear.sale_type = 'w') and (t_w_firstyear.year_total > 0.000000)) +----------------------filter((t_w_secyear.dyear = 2000) and (t_w_secyear.sale_type = 'w')) ------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_c_secyear.customer_id)) otherCondition=((if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL) > if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL))) -----------------------PhysicalDistribute[DistributionSpecHash] -------------------------PhysicalProject ---------------------------filter((t_c_secyear.dyear = 2000) and (t_c_secyear.sale_type = 'c')) -----------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +--------------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_c_firstyear.customer_id)) otherCondition=((if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL) > if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL))) ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_c_firstyear.customer_id)) otherCondition=() +------------------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_c_secyear.customer_id)) otherCondition=() --------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject -------------------------------filter((t_c_firstyear.dyear = 1999) and (t_c_firstyear.sale_type = 'c') and (t_c_firstyear.year_total > 0.000000)) +------------------------------filter((t_c_secyear.dyear = 2000) and (t_c_secyear.sale_type = 'c')) --------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) --------------------------hashJoin[INNER_JOIN] hashCondition=((t_s_secyear.customer_id = t_s_firstyear.customer_id)) otherCondition=() ----------------------------PhysicalDistribute[DistributionSpecHash] @@ -83,4 +75,12 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------------------PhysicalProject --------------------------------filter((t_s_firstyear.dyear = 1999) and (t_s_firstyear.sale_type = 's') and (t_s_firstyear.year_total > 0.000000)) ----------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +----------------------PhysicalDistribute[DistributionSpecHash] +------------------------PhysicalProject +--------------------------filter((t_c_firstyear.dyear = 1999) and (t_c_firstyear.sale_type = 'c') and (t_c_firstyear.year_total > 0.000000)) +----------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +--------------PhysicalDistribute[DistributionSpecHash] +----------------PhysicalProject +------------------filter((t_w_firstyear.dyear = 1999) and (t_w_firstyear.sale_type = 'w') and (t_w_firstyear.year_total > 0.000000)) +--------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query74.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query74.out index 6aaf94a52490e3..334c6842b8352d 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query74.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/noStatsRfPrune/query74.out @@ -39,16 +39,12 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject -------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.0), (year_total / year_total), NULL) > if((year_total > 0.0), (year_total / year_total), NULL))) ---------------PhysicalDistribute[DistributionSpecHash] -----------------PhysicalProject -------------------filter((t_w_secyear.sale_type = 'w') and (t_w_secyear.year = 2000)) ---------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=((if((year_total > 0.0), (year_total / year_total), NULL) > if((year_total > 0.0), (year_total / year_total), NULL))) --------------PhysicalProject -----------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=() +----------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=() ------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject -----------------------filter((t_w_firstyear.sale_type = 'w') and (t_w_firstyear.year = 1999) and (t_w_firstyear.year_total > 0.0)) +----------------------filter((t_w_secyear.sale_type = 'w') and (t_w_secyear.year = 2000)) ------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ------------------hashJoin[INNER_JOIN] hashCondition=((t_s_secyear.customer_id = t_s_firstyear.customer_id)) otherCondition=() --------------------PhysicalDistribute[DistributionSpecHash] @@ -59,4 +55,8 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----------------------PhysicalProject ------------------------filter((t_s_firstyear.sale_type = 's') and (t_s_firstyear.year = 1999) and (t_s_firstyear.year_total > 0.0)) --------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +--------------PhysicalDistribute[DistributionSpecHash] +----------------PhysicalProject +------------------filter((t_w_firstyear.sale_type = 'w') and (t_w_firstyear.year = 1999) and (t_w_firstyear.year_total > 0.0)) +--------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query11.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query11.out index 80827cee4297b3..4640c53beb3828 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query11.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query11.out @@ -39,16 +39,12 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject -------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.00), (cast(year_total as DECIMALV3(38, 8)) / year_total), 0.000000) > if((year_total > 0.00), (cast(year_total as DECIMALV3(38, 8)) / year_total), 0.000000))) ---------------PhysicalDistribute[DistributionSpecHash] -----------------PhysicalProject -------------------filter((t_w_secyear.dyear = 2002) and (t_w_secyear.sale_type = 'w')) ---------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=((if((year_total > 0.00), (cast(year_total as DECIMALV3(38, 8)) / year_total), 0.000000) > if((year_total > 0.00), (cast(year_total as DECIMALV3(38, 8)) / year_total), 0.000000))) --------------PhysicalProject -----------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=() +----------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=() ------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject -----------------------filter((t_w_firstyear.dyear = 2001) and (t_w_firstyear.sale_type = 'w') and (t_w_firstyear.year_total > 0.00)) +----------------------filter((t_w_secyear.dyear = 2002) and (t_w_secyear.sale_type = 'w')) ------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ------------------hashJoin[INNER_JOIN] hashCondition=((t_s_secyear.customer_id = t_s_firstyear.customer_id)) otherCondition=() --------------------PhysicalDistribute[DistributionSpecHash] @@ -59,4 +55,8 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----------------------PhysicalProject ------------------------filter((t_s_firstyear.dyear = 2001) and (t_s_firstyear.sale_type = 's') and (t_s_firstyear.year_total > 0.00)) --------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +--------------PhysicalDistribute[DistributionSpecHash] +----------------PhysicalProject +------------------filter((t_w_firstyear.dyear = 2001) and (t_w_firstyear.sale_type = 'w') and (t_w_firstyear.year_total > 0.00)) +--------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query4.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query4.out index 4a3163d9b6d620..b266d982b5425e 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query4.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query4.out @@ -51,28 +51,20 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject -------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL) > if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL))) ---------------PhysicalDistribute[DistributionSpecHash] -----------------PhysicalProject -------------------filter((t_w_secyear.dyear = 2000) and (t_w_secyear.sale_type = 'w')) ---------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=((if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL) > if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL))) --------------PhysicalProject -----------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=() +----------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=() ------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject -----------------------filter((t_w_firstyear.dyear = 1999) and (t_w_firstyear.sale_type = 'w') and (t_w_firstyear.year_total > 0.000000)) +----------------------filter((t_w_secyear.dyear = 2000) and (t_w_secyear.sale_type = 'w')) ------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_c_secyear.customer_id)) otherCondition=((if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL) > if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL))) -----------------------PhysicalDistribute[DistributionSpecHash] -------------------------PhysicalProject ---------------------------filter((t_c_secyear.dyear = 2000) and (t_c_secyear.sale_type = 'c')) -----------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +--------------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_c_firstyear.customer_id)) otherCondition=((if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL) > if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL))) ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_c_firstyear.customer_id)) otherCondition=() +------------------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_c_secyear.customer_id)) otherCondition=() --------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------PhysicalProject -------------------------------filter((t_c_firstyear.dyear = 1999) and (t_c_firstyear.sale_type = 'c') and (t_c_firstyear.year_total > 0.000000)) +------------------------------filter((t_c_secyear.dyear = 2000) and (t_c_secyear.sale_type = 'c')) --------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) --------------------------hashJoin[INNER_JOIN] hashCondition=((t_s_secyear.customer_id = t_s_firstyear.customer_id)) otherCondition=() ----------------------------PhysicalDistribute[DistributionSpecHash] @@ -83,4 +75,12 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------------------PhysicalProject --------------------------------filter((t_s_firstyear.dyear = 1999) and (t_s_firstyear.sale_type = 's') and (t_s_firstyear.year_total > 0.000000)) ----------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +----------------------PhysicalDistribute[DistributionSpecHash] +------------------------PhysicalProject +--------------------------filter((t_c_firstyear.dyear = 1999) and (t_c_firstyear.sale_type = 'c') and (t_c_firstyear.year_total > 0.000000)) +----------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +--------------PhysicalDistribute[DistributionSpecHash] +----------------PhysicalProject +------------------filter((t_w_firstyear.dyear = 1999) and (t_w_firstyear.sale_type = 'w') and (t_w_firstyear.year_total > 0.000000)) +--------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query74.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query74.out index b921c457fb94e3..a0bc49ecda7715 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query74.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/no_stats_shape/query74.out @@ -39,16 +39,12 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject -------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.0), (year_total / year_total), NULL) > if((year_total > 0.0), (year_total / year_total), NULL))) ---------------PhysicalDistribute[DistributionSpecHash] -----------------PhysicalProject -------------------filter((t_w_secyear.sale_type = 'w') and (t_w_secyear.year = 2000)) ---------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=((if((year_total > 0.0), (year_total / year_total), NULL) > if((year_total > 0.0), (year_total / year_total), NULL))) --------------PhysicalProject -----------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=() +----------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=() ------------------PhysicalDistribute[DistributionSpecHash] --------------------PhysicalProject -----------------------filter((t_w_firstyear.sale_type = 'w') and (t_w_firstyear.year = 1999) and (t_w_firstyear.year_total > 0.0)) +----------------------filter((t_w_secyear.sale_type = 'w') and (t_w_secyear.year = 2000)) ------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ------------------hashJoin[INNER_JOIN] hashCondition=((t_s_secyear.customer_id = t_s_firstyear.customer_id)) otherCondition=() --------------------PhysicalDistribute[DistributionSpecHash] @@ -59,4 +55,8 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----------------------PhysicalProject ------------------------filter((t_s_firstyear.sale_type = 's') and (t_s_firstyear.year = 1999) and (t_s_firstyear.year_total > 0.0)) --------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +--------------PhysicalDistribute[DistributionSpecHash] +----------------PhysicalProject +------------------filter((t_w_firstyear.sale_type = 'w') and (t_w_firstyear.year = 1999) and (t_w_firstyear.year_total > 0.0)) +--------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query4.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query4.out index 7dc2ff7cfb5275..d2aacccf205986 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query4.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query4.out @@ -64,23 +64,23 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_c_firstyear.customer_id)) otherCondition=((if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL) > if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL))) -----------------------PhysicalDistribute[DistributionSpecHash] -------------------------PhysicalProject ---------------------------filter((t_c_firstyear.dyear = 1999) and (t_c_firstyear.sale_type = 'c') and (t_c_firstyear.year_total > 0.000000)) -----------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_c_secyear.customer_id)) otherCondition=() ---------------------------hashJoin[INNER_JOIN] hashCondition=((t_s_secyear.customer_id = t_s_firstyear.customer_id)) otherCondition=() +------------------------hashJoin[INNER_JOIN] hashCondition=((t_s_secyear.customer_id = t_s_firstyear.customer_id)) otherCondition=() +--------------------------PhysicalDistribute[DistributionSpecHash] +----------------------------PhysicalProject +------------------------------filter((t_s_secyear.dyear = 2000) and (t_s_secyear.sale_type = 's')) +--------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +--------------------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_c_secyear.customer_id)) otherCondition=() ----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject ---------------------------------filter((t_s_firstyear.dyear = 1999) and (t_s_firstyear.sale_type = 's') and (t_s_firstyear.year_total > 0.000000)) +--------------------------------filter((t_c_secyear.dyear = 2000) and (t_c_secyear.sale_type = 'c')) ----------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject ---------------------------------filter((t_s_secyear.dyear = 2000) and (t_s_secyear.sale_type = 's')) +--------------------------------filter((t_s_firstyear.dyear = 1999) and (t_s_firstyear.sale_type = 's') and (t_s_firstyear.year_total > 0.000000)) ----------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------------------PhysicalDistribute[DistributionSpecHash] -----------------------------PhysicalProject -------------------------------filter((t_c_secyear.dyear = 2000) and (t_c_secyear.sale_type = 'c')) ---------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +----------------------PhysicalDistribute[DistributionSpecHash] +------------------------PhysicalProject +--------------------------filter((t_c_firstyear.dyear = 1999) and (t_c_firstyear.sale_type = 'c') and (t_c_firstyear.year_total > 0.000000)) +----------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query64.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query64.out index 3639f4ef241dd1..3d48307e63a29a 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query64.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query64.out @@ -7,106 +7,107 @@ PhysicalCteAnchor ( cteId=CTEId#1 ) --------PhysicalDistribute[DistributionSpecHash] ----------hashAgg[LOCAL] ------------PhysicalProject ---------------hashJoin[INNER_JOIN] hashCondition=((customer.c_first_shipto_date_sk = d3.d_date_sk)) otherCondition=() +--------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF20 i_item_sk->[cr_item_sk,cs_item_sk,sr_item_sk,ss_item_sk] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_first_sales_date_sk = d2.d_date_sk)) otherCondition=() +------------------hashJoin[INNER_JOIN] hashCondition=((hd2.hd_income_band_sk = ib2.ib_income_band_sk)) otherCondition=() --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=(( not (cd_marital_status = cd_marital_status))) build RFs:RF17 ss_customer_sk->[c_customer_sk] -------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_current_addr_sk = ad2.ca_address_sk)) otherCondition=() -------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_current_cdemo_sk = cd2.cd_demo_sk)) otherCondition=() -------------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------------PhysicalProject -----------------------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_current_hdemo_sk = hd2.hd_demo_sk)) otherCondition=() -------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[customer] apply RFs: RF17 -------------------------------------------PhysicalDistribute[DistributionSpecReplicated] +----------------------hashJoin[INNER_JOIN] hashCondition=((hd1.hd_income_band_sk = ib1.ib_income_band_sk)) otherCondition=() +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_current_addr_sk = ad2.ca_address_sk)) otherCondition=() +----------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------PhysicalProject +--------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = ad1.ca_address_sk)) otherCondition=() +----------------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------------PhysicalProject +--------------------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_current_hdemo_sk = hd2.hd_demo_sk)) otherCondition=() +----------------------------------------PhysicalProject +------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = hd1.hd_demo_sk)) otherCondition=() --------------------------------------------PhysicalProject -----------------------------------------------hashJoin[INNER_JOIN] hashCondition=((hd2.hd_income_band_sk = ib2.ib_income_band_sk)) otherCondition=() +----------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() ------------------------------------------------PhysicalProject ---------------------------------------------------PhysicalOlapScan[household_demographics] -------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ---------------------------------------------------PhysicalProject -----------------------------------------------------PhysicalOlapScan[income_band] -------------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[customer_demographics] -------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[customer_address] -------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF11 ss_item_sk->[sr_item_sk];RF12 ss_ticket_number->[sr_ticket_number] -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[store_returns] apply RFs: RF11 RF12 -------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_cdemo_sk = cd1.cd_demo_sk)) otherCondition=() build RFs:RF10 ss_cdemo_sk->[cd_demo_sk] -------------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF10 -------------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------------PhysicalProject -----------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_addr_sk = ad1.ca_address_sk)) otherCondition=() build RFs:RF9 ss_addr_sk->[ca_address_sk] -------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[customer_address] apply RFs: RF9 -------------------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF8 i_item_sk->[cr_item_sk,cs_item_sk,ss_item_sk] -----------------------------------------------PhysicalProject -------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() ---------------------------------------------------PhysicalProject -----------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() +--------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_current_cdemo_sk = cd2.cd_demo_sk)) otherCondition=(( not (cd_marital_status = cd_marital_status))) +----------------------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------------------PhysicalProject ---------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((hd1.hd_income_band_sk = ib1.ib_income_band_sk)) otherCondition=() -----------------------------------------------------------PhysicalProject -------------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_hdemo_sk = hd1.hd_demo_sk)) otherCondition=() ---------------------------------------------------------------PhysicalProject -----------------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ss_sold_date_sk] -------------------------------------------------------------------PhysicalProject ---------------------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = cs_ui.cs_item_sk)) otherCondition=() build RFs:RF2 cs_item_sk->[ss_item_sk] -----------------------------------------------------------------------PhysicalProject -------------------------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 RF8 -----------------------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] -------------------------------------------------------------------------PhysicalProject ---------------------------------------------------------------------------filter((sale > (2 * refund))) -----------------------------------------------------------------------------hashAgg[GLOBAL] -------------------------------------------------------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------------------------------------------------------hashAgg[LOCAL] +--------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_cdemo_sk = cd1.cd_demo_sk)) otherCondition=() +----------------------------------------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_first_shipto_date_sk = d3.d_date_sk)) otherCondition=() +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_first_sales_date_sk = d2.d_date_sk)) otherCondition=() +--------------------------------------------------------------------PhysicalProject +----------------------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() +------------------------------------------------------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------------------------------------------------------PhysicalProject +----------------------------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() +------------------------------------------------------------------------------PhysicalProject +--------------------------------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ss_sold_date_sk] ----------------------------------------------------------------------------------PhysicalProject -------------------------------------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() +------------------------------------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF4 sr_item_sk->[cr_item_sk,cs_item_sk] --------------------------------------------------------------------------------------PhysicalProject -----------------------------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF8 +----------------------------------------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((store_sales.ss_item_sk = cs_ui.cs_item_sk)) otherCondition=() build RFs:RF2 cs_item_sk->[ss_item_sk] +------------------------------------------------------------------------------------------PhysicalProject +--------------------------------------------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF6 RF20 +------------------------------------------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] +--------------------------------------------------------------------------------------------PhysicalProject +----------------------------------------------------------------------------------------------filter((sale > (2 * refund))) +------------------------------------------------------------------------------------------------hashAgg[GLOBAL] +--------------------------------------------------------------------------------------------------PhysicalDistribute[DistributionSpecHash] +----------------------------------------------------------------------------------------------------hashAgg[LOCAL] +------------------------------------------------------------------------------------------------------PhysicalProject +--------------------------------------------------------------------------------------------------------hashJoin[INNER_JOIN] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() +----------------------------------------------------------------------------------------------------------PhysicalProject +------------------------------------------------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF4 RF20 +----------------------------------------------------------------------------------------------------------PhysicalProject +------------------------------------------------------------------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF4 RF20 --------------------------------------------------------------------------------------PhysicalProject -----------------------------------------------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF8 -------------------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ---------------------------------------------------------------------PhysicalProject -----------------------------------------------------------------------filter(d_year IN (2001, 2002)) +----------------------------------------------------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF20 +----------------------------------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] +------------------------------------------------------------------------------------PhysicalProject +--------------------------------------------------------------------------------------filter(d_year IN (2001, 2002)) +----------------------------------------------------------------------------------------PhysicalOlapScan[date_dim] +------------------------------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] +--------------------------------------------------------------------------------PhysicalProject +----------------------------------------------------------------------------------PhysicalOlapScan[store] +------------------------------------------------------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------------------------------------------------------PhysicalProject +----------------------------------------------------------------------------PhysicalOlapScan[customer] +--------------------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] +----------------------------------------------------------------------PhysicalProject ------------------------------------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] -----------------------------------------------------------------PhysicalProject -------------------------------------------------------------------PhysicalOlapScan[household_demographics] -----------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] +----------------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] +------------------------------------------------------------------PhysicalProject +--------------------------------------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------------------------------------PhysicalProject ---------------------------------------------------------------PhysicalOlapScan[income_band] -------------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] ---------------------------------------------------------PhysicalProject -----------------------------------------------------------PhysicalOlapScan[store] ---------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] -----------------------------------------------------PhysicalProject -------------------------------------------------------PhysicalOlapScan[promotion] -----------------------------------------------PhysicalDistribute[DistributionSpecReplicated] -------------------------------------------------PhysicalProject ---------------------------------------------------filter((item.i_current_price <= 33.00) and (item.i_current_price >= 24.00) and i_color IN ('blanched', 'brown', 'burlywood', 'chocolate', 'drab', 'medium')) -----------------------------------------------------PhysicalOlapScan[item] +--------------------------------------------------------------PhysicalOlapScan[customer_demographics] +----------------------------------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------------------------------PhysicalProject +--------------------------------------------------------PhysicalOlapScan[customer_demographics] +------------------------------------------------PhysicalDistribute[DistributionSpecReplicated] +--------------------------------------------------PhysicalProject +----------------------------------------------------PhysicalOlapScan[promotion] +--------------------------------------------PhysicalDistribute[DistributionSpecReplicated] +----------------------------------------------PhysicalProject +------------------------------------------------PhysicalOlapScan[household_demographics] +----------------------------------------PhysicalDistribute[DistributionSpecReplicated] +------------------------------------------PhysicalProject +--------------------------------------------PhysicalOlapScan[household_demographics] +----------------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[customer_address] +----------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[customer_address] +------------------------PhysicalDistribute[DistributionSpecReplicated] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[income_band] --------------------PhysicalDistribute[DistributionSpecReplicated] ----------------------PhysicalProject -------------------------PhysicalOlapScan[date_dim] +------------------------PhysicalOlapScan[income_band] ----------------PhysicalDistribute[DistributionSpecReplicated] ------------------PhysicalProject ---------------------PhysicalOlapScan[date_dim] +--------------------filter((item.i_current_price <= 33.00) and (item.i_current_price >= 24.00) and i_color IN ('blanched', 'brown', 'burlywood', 'chocolate', 'drab', 'medium')) +----------------------PhysicalOlapScan[item] --PhysicalResultSink ----PhysicalQuickSort[MERGE_SORT] ------PhysicalDistribute[DistributionSpecGather] diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query74.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query74.out index 88963927ca31e9..04d9e3487c93ad 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query74.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/rf_prune/query74.out @@ -45,18 +45,18 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------filter((t_w_firstyear.sale_type = 'w') and (t_w_firstyear.year = 1999) and (t_w_firstyear.year_total > 0.0)) --------------------PhysicalCteConsumer ( cteId=CTEId#0 ) --------------PhysicalProject -----------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=() -------------------hashJoin[INNER_JOIN] hashCondition=((t_s_secyear.customer_id = t_s_firstyear.customer_id)) otherCondition=() +----------------hashJoin[INNER_JOIN] hashCondition=((t_s_secyear.customer_id = t_s_firstyear.customer_id)) otherCondition=() +------------------PhysicalDistribute[DistributionSpecHash] +--------------------PhysicalProject +----------------------filter((t_s_secyear.sale_type = 's') and (t_s_secyear.year = 2000)) +------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +------------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=() --------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject -------------------------filter((t_s_firstyear.sale_type = 's') and (t_s_firstyear.year = 1999) and (t_s_firstyear.year_total > 0.0)) +------------------------filter((t_w_secyear.sale_type = 'w') and (t_w_secyear.year = 2000)) --------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) --------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject -------------------------filter((t_s_secyear.sale_type = 's') and (t_s_secyear.year = 2000)) +------------------------filter((t_s_firstyear.sale_type = 's') and (t_s_firstyear.year = 1999) and (t_s_firstyear.year_total > 0.0)) --------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -------------------PhysicalDistribute[DistributionSpecHash] ---------------------PhysicalProject -----------------------filter((t_w_secyear.sale_type = 'w') and (t_w_secyear.year = 2000)) -------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query4.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query4.out index 4e38885b431718..12fe14c3d4d0de 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query4.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query4.out @@ -64,23 +64,23 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ------------------PhysicalProject --------------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_c_firstyear.customer_id)) otherCondition=((if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL) > if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL))) -----------------------PhysicalDistribute[DistributionSpecHash] -------------------------PhysicalProject ---------------------------filter((t_c_firstyear.dyear = 1999) and (t_c_firstyear.sale_type = 'c') and (t_c_firstyear.year_total > 0.000000)) -----------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_c_secyear.customer_id)) otherCondition=() ---------------------------hashJoin[INNER_JOIN] hashCondition=((t_s_secyear.customer_id = t_s_firstyear.customer_id)) otherCondition=() +------------------------hashJoin[INNER_JOIN] hashCondition=((t_s_secyear.customer_id = t_s_firstyear.customer_id)) otherCondition=() +--------------------------PhysicalDistribute[DistributionSpecHash] +----------------------------PhysicalProject +------------------------------filter((t_s_secyear.dyear = 2000) and (t_s_secyear.sale_type = 's')) +--------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +--------------------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_c_secyear.customer_id)) otherCondition=() ----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject ---------------------------------filter((t_s_firstyear.dyear = 1999) and (t_s_firstyear.sale_type = 's') and (t_s_firstyear.year_total > 0.000000)) +--------------------------------filter((t_c_secyear.dyear = 2000) and (t_c_secyear.sale_type = 'c')) ----------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------PhysicalProject ---------------------------------filter((t_s_secyear.dyear = 2000) and (t_s_secyear.sale_type = 's')) +--------------------------------filter((t_s_firstyear.dyear = 1999) and (t_s_firstyear.sale_type = 's') and (t_s_firstyear.year_total > 0.000000)) ----------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------------------PhysicalDistribute[DistributionSpecHash] -----------------------------PhysicalProject -------------------------------filter((t_c_secyear.dyear = 2000) and (t_c_secyear.sale_type = 'c')) ---------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +----------------------PhysicalDistribute[DistributionSpecHash] +------------------------PhysicalProject +--------------------------filter((t_c_firstyear.dyear = 1999) and (t_c_firstyear.sale_type = 'c') and (t_c_firstyear.year_total > 0.000000)) +----------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query74.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query74.out index 05d89d51e4b799..f189a6a8da663f 100644 --- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query74.out +++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query74.out @@ -45,18 +45,18 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------filter((t_w_firstyear.sale_type = 'w') and (t_w_firstyear.year = 1999) and (t_w_firstyear.year_total > 0.0)) --------------------PhysicalCteConsumer ( cteId=CTEId#0 ) --------------PhysicalProject -----------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=() -------------------hashJoin[INNER_JOIN] hashCondition=((t_s_secyear.customer_id = t_s_firstyear.customer_id)) otherCondition=() +----------------hashJoin[INNER_JOIN] hashCondition=((t_s_secyear.customer_id = t_s_firstyear.customer_id)) otherCondition=() +------------------PhysicalDistribute[DistributionSpecHash] +--------------------PhysicalProject +----------------------filter((t_s_secyear.sale_type = 's') and (t_s_secyear.year = 2000)) +------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +------------------hashJoin[INNER_JOIN] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=() --------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject -------------------------filter((t_s_firstyear.sale_type = 's') and (t_s_firstyear.year = 1999) and (t_s_firstyear.year_total > 0.0)) +------------------------filter((t_w_secyear.sale_type = 'w') and (t_w_secyear.year = 2000)) --------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) --------------------PhysicalDistribute[DistributionSpecHash] ----------------------PhysicalProject -------------------------filter((t_s_secyear.sale_type = 's') and (t_s_secyear.year = 2000)) +------------------------filter((t_s_firstyear.sale_type = 's') and (t_s_firstyear.year = 1999) and (t_s_firstyear.year_total > 0.0)) --------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -------------------PhysicalDistribute[DistributionSpecHash] ---------------------PhysicalProject -----------------------filter((t_w_secyear.sale_type = 'w') and (t_w_secyear.year = 2000)) -------------------------PhysicalCteConsumer ( cteId=CTEId#0 )