diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/properties/FunctionalDependencies.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/properties/FunctionalDependencies.java index 80ea1b025c..a516bf9ae1 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/properties/FunctionalDependencies.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/properties/FunctionalDependencies.java @@ -106,10 +106,6 @@ public class FunctionalDependencies { return equalSet.calEqualSetList(); } - public Set calEqualSet(Slot s) { - return equalSet.calEqualSet(s); - } - public ImmutableSet getFdItems() { return fdItems; } diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/algebra/Window.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/algebra/Window.java index 1dacda593d..00d290940e 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/algebra/Window.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/algebra/Window.java @@ -25,7 +25,6 @@ import org.apache.doris.nereids.glue.translator.PlanTranslatorContext; import org.apache.doris.nereids.trees.expressions.Alias; import org.apache.doris.nereids.trees.expressions.Expression; import org.apache.doris.nereids.trees.expressions.NamedExpression; -import org.apache.doris.nereids.trees.expressions.Slot; import org.apache.doris.nereids.trees.expressions.SlotReference; import org.apache.doris.nereids.trees.expressions.WindowExpression; import org.apache.doris.nereids.trees.expressions.WindowFrame; @@ -33,7 +32,6 @@ import org.apache.doris.nereids.trees.expressions.WindowFrame.FrameBoundType; import org.apache.doris.nereids.trees.expressions.WindowFrame.FrameBoundary; import org.apache.doris.nereids.trees.expressions.WindowFrame.FrameUnitsType; import org.apache.doris.nereids.trees.expressions.literal.Literal; -import org.apache.doris.nereids.trees.plans.logical.LogicalWindow; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Maps; @@ -117,16 +115,6 @@ public interface Window { int winExprCount = getWindowExpressions().size(); for (Map.Entry entry : partitionKeyCount.entrySet()) { if (entry.getValue() == winExprCount && entry.getKey() instanceof SlotReference) { - SlotReference slot = (SlotReference) entry.getKey(); - if (this instanceof LogicalWindow) { - LogicalWindow lw = (LogicalWindow) this; - Set equalSlots = lw.getLogicalProperties().getTrait().calEqualSet(slot); - for (Slot other : equalSlots) { - if (other instanceof SlotReference) { - commonPartitionKeySet.add((SlotReference) other); - } - } - } commonPartitionKeySet.add((SlotReference) entry.getKey()); } } diff --git a/regression-test/data/nereids_tpch_p0/tpch/push_filter_window_eqset.out b/regression-test/data/nereids_tpch_p0/tpch/push_filter_window_eqset.out deleted file mode 100644 index 0a14dd5f07..0000000000 --- a/regression-test/data/nereids_tpch_p0/tpch/push_filter_window_eqset.out +++ /dev/null @@ -1,12 +0,0 @@ --- This file is automatically generated. You should know what you did if you want to edit this --- !eqset -- -PhysicalResultSink ---PhysicalDistribute[DistributionSpecGather] -----PhysicalProject -------PhysicalWindow ---------PhysicalQuickSort[LOCAL_SORT] -----------PhysicalDistribute[DistributionSpecHash] -------------PhysicalProject ---------------filter((region.r_regionkey = 1)) -----------------PhysicalOlapScan[region] - diff --git a/regression-test/suites/nereids_tpch_p0/tpch/push_filter_window_eqset.groovy b/regression-test/suites/nereids_tpch_p0/tpch/push_filter_window_eqset.groovy deleted file mode 100644 index e6926b8dd6..0000000000 --- a/regression-test/suites/nereids_tpch_p0/tpch/push_filter_window_eqset.groovy +++ /dev/null @@ -1,46 +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. - */ - -suite("push_filter_window_eqset") { - 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'; - - /** - check the filter is pushed through window - PhysicalResultSink - --PhysicalDistribute[DistributionSpecGather] - ----PhysicalProject - ------PhysicalWindow - --------PhysicalQuickSort[LOCAL_SORT] - ----------PhysicalDistribute[DistributionSpecHash] - ------------PhysicalProject - >>>>>--------filter((region.r_regionkey = 1)) - ----------------PhysicalOlapScan[region] - **/ - qt_eqset """ - explain shape plan - select y - from ( - select r_regionkey as x, r_regionkey as y, row_number() over(partition by r_regionkey) as rn from region - ) T - where y = 1; - """ -} \ No newline at end of file