This is an automated email from the ASF dual-hosted git repository.
jakevin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new d73b945535f [chore](Nereids): rename pushdown to push_down (#27473)
d73b945535f is described below
commit d73b945535f431966c46ee553e1e735876e81e65
Author: jakevin <[email protected]>
AuthorDate: Thu Nov 23 21:04:40 2023 +0800
[chore](Nereids): rename pushdown to push_down (#27473)
---
.../doris/nereids/jobs/executor/Rewriter.java | 51 +++++++++++---------
.../nereids/processor/post/PlanPostProcessors.java | 2 +-
...ject.java => PushDownFilterThroughProject.java} | 2 +-
.../org/apache/doris/nereids/rules/RuleSet.java | 56 +++++++++++-----------
.../org/apache/doris/nereids/rules/RuleType.java | 50 +++++++++----------
.../nereids/rules/exploration/OrExpansion.java | 8 ++--
...a => PushDownProjectThroughInnerOuterJoin.java} | 8 ++--
...in.java => PushDownProjectThroughSemiJoin.java} | 8 ++--
...nionAll.java => PushDownAliasIntoUnionAll.java} | 4 +-
...oughJoin.java => PushDownAliasThroughJoin.java} | 4 +-
...oughJoin.java => PushDownCountThroughJoin.java} | 10 ++--
...hJoin.java => PushDownDistinctThroughJoin.java} | 4 +-
...ava => PushDownExpressionsInHashCondition.java} | 6 +--
....java => PushDownFilterThroughAggregation.java} | 4 +-
...ughJoin.java => PushDownFilterThroughJoin.java} | 6 +--
...ava => PushDownFilterThroughPartitionTopN.java} | 4 +-
...ject.java => PushDownFilterThroughProject.java} | 8 ++--
...epeat.java => PushDownFilterThroughRepeat.java} | 4 +-
...java => PushDownFilterThroughSetOperation.java} | 4 +-
...ughSort.java => PushDownFilterThroughSort.java} | 4 +-
...indow.java => PushDownFilterThroughWindow.java} | 4 +-
...dition.java => PushDownJoinOtherCondition.java} | 4 +-
.../{PushdownLimit.java => PushDownLimit.java} | 2 +-
....java => PushDownLimitDistinctThroughJoin.java} | 2 +-
...ughJoin.java => PushDownMinMaxThroughJoin.java} | 10 ++--
...Limit.java => PushDownProjectThroughLimit.java} | 4 +-
...hroughJoin.java => PushDownSumThroughJoin.java} | 10 ++--
...roughJoin.java => PushDownTopNThroughJoin.java} | 2 +-
...hWindow.java => PushDownTopNThroughWindow.java} | 2 +-
.../rules/rewrite/TransposeSemiJoinAgg.java | 2 +-
....java => PushDownFilterThroughProjectTest.java} | 6 +--
.../join/InnerJoinLAsscomProjectTest.java | 6 +--
.../join/OuterJoinLAsscomProjectTest.java | 4 +-
... PushDownProjectThroughInnerOuterJoinTest.java} | 10 ++--
...ava => PushDownProjectThroughSemiJoinTest.java} | 8 ++--
.../AggScalarSubQueryToWindowFunctionTest.java | 2 +-
...t.java => PushDowFilterThroughProjectTest.java} | 10 ++--
...Test.java => PushDownAliasThroughJoinTest.java} | 10 ++--
...Test.java => PushDownCountThroughJoinTest.java} | 22 ++++-----
...t.java => PushDownDistinctThroughJoinTest.java} | 10 ++--
...=> PushDownExpressionsInHashConditionTest.java} | 10 ++--
...a => PushDownFilterThroughAggregationTest.java} | 10 ++--
...est.java => PushDownFilterThroughJoinTest.java} | 14 +++---
...est.java => PushDownFilterThroughSortTest.java} | 10 ++--
...t.java => PushDownFilterThroughWindowTest.java} | 4 +-
...st.java => PushDownJoinOtherConditionTest.java} | 8 ++--
...a => PushDownLimitDistinctThroughJoinTest.java} | 14 +++---
...shdownLimitTest.java => PushDownLimitTest.java} | 4 +-
...est.java => PushDownMinMaxThroughJoinTest.java} | 22 ++++-----
...t.java => PushDownProjectThroughLimitTest.java} | 4 +-
...inTest.java => PushDownSumThroughJoinTest.java} | 14 +++---
...nTest.java => PushDownTopNThroughJoinTest.java} | 10 ++--
.../rules/rewrite/mv/SelectRollupIndexTest.java | 4 +-
53 files changed, 255 insertions(+), 250 deletions(-)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/nereids/jobs/executor/Rewriter.java
b/fe/fe-core/src/main/java/org/apache/doris/nereids/jobs/executor/Rewriter.java
index 1b8b0d86f09..15e08d052e9 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/nereids/jobs/executor/Rewriter.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/nereids/jobs/executor/Rewriter.java
@@ -91,14 +91,14 @@ import
org.apache.doris.nereids.rules.rewrite.PullUpProjectUnderLimit;
import org.apache.doris.nereids.rules.rewrite.PullUpProjectUnderTopN;
import org.apache.doris.nereids.rules.rewrite.PushConjunctsIntoEsScan;
import org.apache.doris.nereids.rules.rewrite.PushConjunctsIntoJdbcScan;
+import org.apache.doris.nereids.rules.rewrite.PushDownFilterThroughProject;
+import org.apache.doris.nereids.rules.rewrite.PushDownLimit;
+import org.apache.doris.nereids.rules.rewrite.PushDownLimitDistinctThroughJoin;
+import org.apache.doris.nereids.rules.rewrite.PushDownTopNThroughJoin;
+import org.apache.doris.nereids.rules.rewrite.PushDownTopNThroughWindow;
import org.apache.doris.nereids.rules.rewrite.PushFilterInsideJoin;
import org.apache.doris.nereids.rules.rewrite.PushProjectIntoOneRowRelation;
import org.apache.doris.nereids.rules.rewrite.PushProjectThroughUnion;
-import org.apache.doris.nereids.rules.rewrite.PushdownFilterThroughProject;
-import org.apache.doris.nereids.rules.rewrite.PushdownLimit;
-import org.apache.doris.nereids.rules.rewrite.PushdownLimitDistinctThroughJoin;
-import org.apache.doris.nereids.rules.rewrite.PushdownTopNThroughJoin;
-import org.apache.doris.nereids.rules.rewrite.PushdownTopNThroughWindow;
import org.apache.doris.nereids.rules.rewrite.ReorderJoin;
import org.apache.doris.nereids.rules.rewrite.RewriteCteChildren;
import org.apache.doris.nereids.rules.rewrite.SemiJoinCommute;
@@ -152,7 +152,7 @@ public class Rewriter extends AbstractBatchJobExecutor {
// after doing NormalizeAggregate in analysis job
// we need run the following 2 rules to make
AGG_SCALAR_SUBQUERY_TO_WINDOW_FUNCTION work
bottomUp(new PullUpProjectUnderApply()),
- topDown(new PushdownFilterThroughProject()),
+ topDown(new PushDownFilterThroughProject()),
custom(RuleType.AGG_SCALAR_SUBQUERY_TO_WINDOW_FUNCTION,
AggScalarSubQueryToWindowFunction::new),
bottomUp(
@@ -236,13 +236,13 @@ public class Rewriter extends AbstractBatchJobExecutor {
topDown(new ConvertInnerOrCrossJoin())
),
topic("LEADING JOIN",
- bottomUp(
- new CollectJoinConstraint()
- ),
- custom(RuleType.LEADING_JOIN, LeadingJoin::new),
- bottomUp(
- new ExpressionRewrite(CheckLegalityAfterRewrite.INSTANCE)
- )
+ bottomUp(
+ new CollectJoinConstraint()
+ ),
+ custom(RuleType.LEADING_JOIN, LeadingJoin::new),
+ bottomUp(
+ new
ExpressionRewrite(CheckLegalityAfterRewrite.INSTANCE)
+ )
),
topic("Column pruning and infer predicate",
custom(RuleType.COLUMN_PRUNING, ColumnPruning::new),
@@ -272,8 +272,13 @@ public class Rewriter extends AbstractBatchJobExecutor {
topDown(new BuildAggForUnion())
),
- // topic("Distinct",
- //
costBased(custom(RuleType.PUSH_DOWN_DISTINCT_THROUGH_JOIN,
PushdownDistinctThroughJoin::new))
+ // topic("Eager aggregation",
+ // topDown(
+ // new PushDownSumThroughJoin(),
+ // new PushDownMinMaxThroughJoin(),
+ // new PushDownCountThroughJoin()
+ // ),
+ // custom(RuleType.PUSH_DOWN_DISTINCT_THROUGH_JOIN,
PushDownDistinctThroughJoin::new)
// ),
topic("Limit optimization",
@@ -284,10 +289,10 @@ public class Rewriter extends AbstractBatchJobExecutor {
topDown(new LimitSortToTopN()),
topDown(new SplitLimit()),
topDown(
- new PushdownLimit(),
- new PushdownTopNThroughJoin(),
- new PushdownLimitDistinctThroughJoin(),
- new PushdownTopNThroughWindow()
+ new PushDownLimit(),
+ new PushDownTopNThroughJoin(),
+ new PushDownLimitDistinctThroughJoin(),
+ new PushDownTopNThroughWindow()
),
topDown(new CreatePartitionTopNFromWindow()),
topDown(
@@ -310,7 +315,7 @@ public class Rewriter extends AbstractBatchJobExecutor {
new SelectMaterializedIndexWithAggregate(),
new SelectMaterializedIndexWithoutAggregate(),
new EliminateFilter(),
- new PushdownFilterThroughProject(),
+ new PushDownFilterThroughProject(),
new MergeProjects(),
new PruneOlapScanTablet()
),
@@ -330,7 +335,7 @@ public class Rewriter extends AbstractBatchJobExecutor {
topic("Final rewrite and check",
custom(RuleType.CHECK_DATA_TYPES, CheckDataTypes::new),
custom(RuleType.ENSURE_PROJECT_ON_TOP_JOIN,
EnsureProjectOnTopJoin::new),
- topDown(new PushdownFilterThroughProject(), new
MergeProjects()),
+ topDown(new PushDownFilterThroughProject(), new
MergeProjects()),
custom(RuleType.ADJUST_CONJUNCTS_RETURN_TYPE,
AdjustConjunctsReturnType::new),
bottomUp(
new
ExpressionRewrite(CheckLegalityAfterRewrite.INSTANCE),
@@ -378,8 +383,8 @@ public class Rewriter extends AbstractBatchJobExecutor {
private static List<RewriteJob> getWholeTreeRewriteJobs(boolean
withCostBased) {
List<RewriteJob> withoutCostBased =
Rewriter.CTE_CHILDREN_REWRITE_JOBS.stream()
- .filter(j -> !(j instanceof CostBasedRewriteJob))
- .collect(Collectors.toList());
+ .filter(j -> !(j instanceof CostBasedRewriteJob))
+ .collect(Collectors.toList());
return getWholeTreeRewriteJobs(withCostBased ?
CTE_CHILDREN_REWRITE_JOBS : withoutCostBased);
}
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/nereids/processor/post/PlanPostProcessors.java
b/fe/fe-core/src/main/java/org/apache/doris/nereids/processor/post/PlanPostProcessors.java
index 9ae4c55608b..7e69db04773 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/nereids/processor/post/PlanPostProcessors.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/nereids/processor/post/PlanPostProcessors.java
@@ -58,7 +58,7 @@ public class PlanPostProcessors {
public List<PlanPostProcessor> getProcessors() {
// add processor if we need
Builder<PlanPostProcessor> builder = ImmutableList.builder();
- builder.add(new PushdownFilterThroughProject());
+ builder.add(new PushDownFilterThroughProject());
builder.add(new MergeProjectPostProcessor());
builder.add(new RecomputeLogicalPropertiesProcessor());
builder.add(new TopNScanOpt());
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/nereids/processor/post/PushdownFilterThroughProject.java
b/fe/fe-core/src/main/java/org/apache/doris/nereids/processor/post/PushDownFilterThroughProject.java
similarity index 97%
rename from
fe/fe-core/src/main/java/org/apache/doris/nereids/processor/post/PushdownFilterThroughProject.java
rename to
fe/fe-core/src/main/java/org/apache/doris/nereids/processor/post/PushDownFilterThroughProject.java
index b5f269b0695..643a4ee509f 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/nereids/processor/post/PushdownFilterThroughProject.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/nereids/processor/post/PushDownFilterThroughProject.java
@@ -27,7 +27,7 @@ import org.apache.doris.nereids.util.ExpressionUtils;
/**
* merge consecutive projects
*/
-public class PushdownFilterThroughProject extends PlanPostProcessor {
+public class PushDownFilterThroughProject extends PlanPostProcessor {
@Override
public Plan visitPhysicalFilter(PhysicalFilter<? extends Plan> filter,
CascadesContext context) {
Plan child = filter.child();
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/RuleSet.java
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/RuleSet.java
index 80163663184..736ad7f7a87 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/RuleSet.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/RuleSet.java
@@ -36,8 +36,8 @@ import
org.apache.doris.nereids.rules.exploration.join.OuterJoinAssoc;
import org.apache.doris.nereids.rules.exploration.join.OuterJoinAssocProject;
import org.apache.doris.nereids.rules.exploration.join.OuterJoinLAsscom;
import org.apache.doris.nereids.rules.exploration.join.OuterJoinLAsscomProject;
-import
org.apache.doris.nereids.rules.exploration.join.PushdownProjectThroughInnerOuterJoin;
-import
org.apache.doris.nereids.rules.exploration.join.PushdownProjectThroughSemiJoin;
+import
org.apache.doris.nereids.rules.exploration.join.PushDownProjectThroughInnerOuterJoin;
+import
org.apache.doris.nereids.rules.exploration.join.PushDownProjectThroughSemiJoin;
import
org.apache.doris.nereids.rules.exploration.join.SemiJoinSemiJoinTranspose;
import
org.apache.doris.nereids.rules.exploration.join.SemiJoinSemiJoinTransposeProject;
import org.apache.doris.nereids.rules.implementation.AggregateStrategies;
@@ -80,18 +80,18 @@ import org.apache.doris.nereids.rules.rewrite.MergeFilters;
import org.apache.doris.nereids.rules.rewrite.MergeGenerates;
import org.apache.doris.nereids.rules.rewrite.MergeLimits;
import org.apache.doris.nereids.rules.rewrite.MergeProjects;
-import org.apache.doris.nereids.rules.rewrite.PushdownAliasThroughJoin;
-import
org.apache.doris.nereids.rules.rewrite.PushdownExpressionsInHashCondition;
-import org.apache.doris.nereids.rules.rewrite.PushdownFilterThroughAggregation;
-import org.apache.doris.nereids.rules.rewrite.PushdownFilterThroughJoin;
-import
org.apache.doris.nereids.rules.rewrite.PushdownFilterThroughPartitionTopN;
-import org.apache.doris.nereids.rules.rewrite.PushdownFilterThroughProject;
-import org.apache.doris.nereids.rules.rewrite.PushdownFilterThroughRepeat;
-import
org.apache.doris.nereids.rules.rewrite.PushdownFilterThroughSetOperation;
-import org.apache.doris.nereids.rules.rewrite.PushdownFilterThroughSort;
-import org.apache.doris.nereids.rules.rewrite.PushdownFilterThroughWindow;
-import org.apache.doris.nereids.rules.rewrite.PushdownJoinOtherCondition;
-import org.apache.doris.nereids.rules.rewrite.PushdownProjectThroughLimit;
+import org.apache.doris.nereids.rules.rewrite.PushDownAliasThroughJoin;
+import
org.apache.doris.nereids.rules.rewrite.PushDownExpressionsInHashCondition;
+import org.apache.doris.nereids.rules.rewrite.PushDownFilterThroughAggregation;
+import org.apache.doris.nereids.rules.rewrite.PushDownFilterThroughJoin;
+import
org.apache.doris.nereids.rules.rewrite.PushDownFilterThroughPartitionTopN;
+import org.apache.doris.nereids.rules.rewrite.PushDownFilterThroughProject;
+import org.apache.doris.nereids.rules.rewrite.PushDownFilterThroughRepeat;
+import
org.apache.doris.nereids.rules.rewrite.PushDownFilterThroughSetOperation;
+import org.apache.doris.nereids.rules.rewrite.PushDownFilterThroughSort;
+import org.apache.doris.nereids.rules.rewrite.PushDownFilterThroughWindow;
+import org.apache.doris.nereids.rules.rewrite.PushDownJoinOtherCondition;
+import org.apache.doris.nereids.rules.rewrite.PushDownProjectThroughLimit;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableList.Builder;
@@ -115,8 +115,8 @@ public class RuleSet {
.add(SemiJoinSemiJoinTransposeProject.INSTANCE)
.add(LogicalJoinSemiJoinTranspose.INSTANCE)
.add(LogicalJoinSemiJoinTransposeProject.INSTANCE)
- .add(PushdownProjectThroughInnerOuterJoin.INSTANCE)
- .add(PushdownProjectThroughSemiJoin.INSTANCE)
+ .add(PushDownProjectThroughInnerOuterJoin.INSTANCE)
+ .add(PushDownProjectThroughSemiJoin.INSTANCE)
.add(TransposeAggSemiJoin.INSTANCE)
.add(TransposeAggSemiJoinProject.INSTANCE)
.add(OrExpansion.INSTANCE)
@@ -124,24 +124,24 @@ public class RuleSet {
public static final List<RuleFactory> PUSH_DOWN_FILTERS = ImmutableList.of(
new CreatePartitionTopNFromWindow(),
- new PushdownFilterThroughProject(),
- new PushdownFilterThroughSort(),
- new PushdownJoinOtherCondition(),
- new PushdownFilterThroughJoin(),
- new PushdownExpressionsInHashCondition(),
- new PushdownFilterThroughAggregation(),
- new PushdownFilterThroughRepeat(),
- new PushdownFilterThroughSetOperation(),
- new PushdownProjectThroughLimit(),
+ new PushDownFilterThroughProject(),
+ new PushDownFilterThroughSort(),
+ new PushDownJoinOtherCondition(),
+ new PushDownFilterThroughJoin(),
+ new PushDownExpressionsInHashCondition(),
+ new PushDownFilterThroughAggregation(),
+ new PushDownFilterThroughRepeat(),
+ new PushDownFilterThroughSetOperation(),
+ new PushDownProjectThroughLimit(),
new EliminateOuterJoin(),
new ConvertOuterJoinToAntiJoin(),
new MergeProjects(),
new MergeFilters(),
new MergeGenerates(),
new MergeLimits(),
- new PushdownAliasThroughJoin(),
- new PushdownFilterThroughWindow(),
- new PushdownFilterThroughPartitionTopN()
+ new PushDownAliasThroughJoin(),
+ new PushDownFilterThroughWindow(),
+ new PushDownFilterThroughPartitionTopN()
);
public static final List<Rule> IMPLEMENTATION_RULES = planRuleFactories()
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/RuleType.java
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/RuleType.java
index f8760ada9ec..40a63a056c0 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/RuleType.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/RuleType.java
@@ -142,35 +142,35 @@ public enum RuleType {
IN_APPLY_TO_JOIN(RuleTypeClass.REWRITE),
EXISTS_APPLY_TO_JOIN(RuleTypeClass.REWRITE),
// predicate push down rules
- PUSHDOWN_JOIN_OTHER_CONDITION(RuleTypeClass.REWRITE),
- PUSHDOWN_PREDICATE_THROUGH_AGGREGATION(RuleTypeClass.REWRITE),
- PUSHDOWN_PREDICATE_THROUGH_REPEAT(RuleTypeClass.REWRITE),
- PUSHDOWN_EXPRESSIONS_IN_HASH_CONDITIONS(RuleTypeClass.REWRITE),
+ PUSH_DOWN_JOIN_OTHER_CONDITION(RuleTypeClass.REWRITE),
+ PUSH_DOWN_PREDICATE_THROUGH_AGGREGATION(RuleTypeClass.REWRITE),
+ PUSH_DOWN_PREDICATE_THROUGH_REPEAT(RuleTypeClass.REWRITE),
+ PUSH_DOWN_EXPRESSIONS_IN_HASH_CONDITIONS(RuleTypeClass.REWRITE),
// Pushdown filter
- PUSHDOWN_FILTER_THROUGH_JOIN(RuleTypeClass.REWRITE),
- PUSHDOWN_FILTER_THROUGH_LEFT_SEMI_JOIN(RuleTypeClass.REWRITE),
+ PUSH_DOWN_FILTER_THROUGH_JOIN(RuleTypeClass.REWRITE),
+ PUSH_DOWN_FILTER_THROUGH_LEFT_SEMI_JOIN(RuleTypeClass.REWRITE),
PUSH_FILTER_INSIDE_JOIN(RuleTypeClass.REWRITE),
- PUSHDOWN_FILTER_THROUGH_PROJECT(RuleTypeClass.REWRITE),
- PUSHDOWN_FILTER_THROUGH_PROJECT_UNDER_LIMIT(RuleTypeClass.REWRITE),
- PUSHDOWN_FILTER_THROUGH_WINDOW(RuleTypeClass.REWRITE),
- PUSHDOWN_FILTER_THROUGH_PARTITION_TOPN(RuleTypeClass.REWRITE),
- PUSHDOWN_PROJECT_THROUGH_LIMIT(RuleTypeClass.REWRITE),
- PUSHDOWN_ALIAS_THROUGH_JOIN(RuleTypeClass.REWRITE),
- PUSHDOWN_ALIAS_INTO_UNION_ALL(RuleTypeClass.REWRITE),
- PUSHDOWN_FILTER_THROUGH_SET_OPERATION(RuleTypeClass.REWRITE),
- PUSHDOWN_FILTER_THROUGH_SORT(RuleTypeClass.REWRITE),
+ PUSH_DOWN_FILTER_THROUGH_PROJECT(RuleTypeClass.REWRITE),
+ PUSH_DOWN_FILTER_THROUGH_PROJECT_UNDER_LIMIT(RuleTypeClass.REWRITE),
+ PUSH_DOWN_FILTER_THROUGH_WINDOW(RuleTypeClass.REWRITE),
+ PUSH_DOWN_FILTER_THROUGH_PARTITION_TOPN(RuleTypeClass.REWRITE),
+ PUSH_DOWN_PROJECT_THROUGH_LIMIT(RuleTypeClass.REWRITE),
+ PUSH_DOWN_ALIAS_THROUGH_JOIN(RuleTypeClass.REWRITE),
+ PUSH_DOWN_ALIAS_INTO_UNION_ALL(RuleTypeClass.REWRITE),
+ PUSH_DOWN_FILTER_THROUGH_SET_OPERATION(RuleTypeClass.REWRITE),
+ PUSH_DOWN_FILTER_THROUGH_SORT(RuleTypeClass.REWRITE),
- PUSHDOWN_FILTER_THROUGH_CTE(RuleTypeClass.REWRITE),
- PUSHDOWN_FILTER_THROUGH_CTE_ANCHOR(RuleTypeClass.REWRITE),
+ PUSH_DOWN_FILTER_THROUGH_CTE(RuleTypeClass.REWRITE),
+ PUSH_DOWN_FILTER_THROUGH_CTE_ANCHOR(RuleTypeClass.REWRITE),
- PUSHDOWN_DISTINCT_THROUGH_JOIN(RuleTypeClass.REWRITE),
+ PUSH_DOWN_DISTINCT_THROUGH_JOIN(RuleTypeClass.REWRITE),
COLUMN_PRUNING(RuleTypeClass.REWRITE),
ELIMINATE_SORT(RuleTypeClass.REWRITE),
- PUSHDOWN_MIN_MAX_THROUGH_JOIN(RuleTypeClass.REWRITE),
- PUSHDOWN_SUM_THROUGH_JOIN(RuleTypeClass.REWRITE),
- PUSHDOWN_COUNT_THROUGH_JOIN(RuleTypeClass.REWRITE),
+ PUSH_DOWN_MIN_MAX_THROUGH_JOIN(RuleTypeClass.REWRITE),
+ PUSH_DOWN_SUM_THROUGH_JOIN(RuleTypeClass.REWRITE),
+ PUSH_DOWN_COUNT_THROUGH_JOIN(RuleTypeClass.REWRITE),
TRANSPOSE_LOGICAL_SEMI_JOIN_LOGICAL_JOIN(RuleTypeClass.REWRITE),
TRANSPOSE_LOGICAL_SEMI_JOIN_LOGICAL_JOIN_PROJECT(RuleTypeClass.REWRITE),
@@ -311,10 +311,10 @@ public enum RuleType {
TRANSPOSE_LOGICAL_AGG_SEMI_JOIN(RuleTypeClass.EXPLORATION),
TRANSPOSE_LOGICAL_AGG_SEMI_JOIN_PROJECT(RuleTypeClass.EXPLORATION),
TRANSPOSE_LOGICAL_JOIN_UNION(RuleTypeClass.EXPLORATION),
- PUSHDOWN_PROJECT_THROUGH_SEMI_JOIN_LEFT(RuleTypeClass.EXPLORATION),
- PUSHDOWN_PROJECT_THROUGH_SEMI_JOIN_RIGHT(RuleTypeClass.EXPLORATION),
- PUSHDOWN_PROJECT_THROUGH_INNER_OUTER_JOIN_LEFT(RuleTypeClass.EXPLORATION),
- PUSHDOWN_PROJECT_THROUGH_INNER_OUTER_JOIN_RIGHT(RuleTypeClass.EXPLORATION),
+ PUSH_DOWN_PROJECT_THROUGH_SEMI_JOIN_LEFT(RuleTypeClass.EXPLORATION),
+ PUSH_DOWN_PROJECT_THROUGH_SEMI_JOIN_RIGHT(RuleTypeClass.EXPLORATION),
+ PUSH_DOWN_PROJECT_THROUGH_INNER_OUTER_JOIN_LEFT(RuleTypeClass.EXPLORATION),
+
PUSH_DOWN_PROJECT_THROUGH_INNER_OUTER_JOIN_RIGHT(RuleTypeClass.EXPLORATION),
EAGER_COUNT(RuleTypeClass.EXPLORATION),
EAGER_GROUP_BY(RuleTypeClass.EXPLORATION),
EAGER_GROUP_BY_COUNT(RuleTypeClass.EXPLORATION),
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/OrExpansion.java
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/OrExpansion.java
index 9019565142b..73863ba1ae0 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/OrExpansion.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/OrExpansion.java
@@ -21,7 +21,7 @@ import org.apache.doris.common.Pair;
import org.apache.doris.nereids.CascadesContext;
import org.apache.doris.nereids.rules.Rule;
import org.apache.doris.nereids.rules.RuleType;
-import
org.apache.doris.nereids.rules.rewrite.PushdownExpressionsInHashCondition;
+import
org.apache.doris.nereids.rules.rewrite.PushDownExpressionsInHashCondition;
import org.apache.doris.nereids.trees.expressions.Alias;
import org.apache.doris.nereids.trees.expressions.Expression;
import org.apache.doris.nereids.trees.expressions.NamedExpression;
@@ -178,7 +178,7 @@ public class OrExpansion extends OneExplorationRuleFactory {
otherConditions, originJoin.getHint(),
originJoin.getMarkJoinSlotReference(), left, right);
if (hashCond.children().stream().anyMatch(e -> !(e instanceof Slot))) {
- Plan normalizedPlan =
PushdownExpressionsInHashCondition.pushDownHashExpression(
+ Plan normalizedPlan =
PushDownExpressionsInHashCondition.pushDownHashExpression(
(LogicalJoin<? extends Plan, ? extends Plan>) newPlan);
newPlan = new LogicalProject<>(new
ArrayList<>(newPlan.getOutput()), normalizedPlan);
}
@@ -195,7 +195,7 @@ public class OrExpansion extends OneExplorationRuleFactory {
new ArrayList<>(), originJoin.getHint(),
originJoin.getMarkJoinSlotReference(), newPlan, newRight);
if (hashCond.children().stream().anyMatch(e -> !(e instanceof
Slot))) {
- newPlan =
PushdownExpressionsInHashCondition.pushDownHashExpression(
+ newPlan =
PushDownExpressionsInHashCondition.pushDownHashExpression(
(LogicalJoin<? extends Plan, ? extends Plan>) newPlan);
}
}
@@ -252,7 +252,7 @@ public class OrExpansion extends OneExplorationRuleFactory {
join.getMarkJoinSlotReference(), left, right);
if (newJoin.getHashJoinConjuncts().stream()
.anyMatch(equalTo ->
equalTo.children().stream().anyMatch(e -> !(e instanceof Slot)))) {
- Plan plan =
PushdownExpressionsInHashCondition.pushDownHashExpression(newJoin);
+ Plan plan =
PushDownExpressionsInHashCondition.pushDownHashExpression(newJoin);
plan = new LogicalProject<>(new
ArrayList<>(newJoin.getOutput()), plan);
joins.add(plan);
} else {
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/PushdownProjectThroughInnerOuterJoin.java
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/PushDownProjectThroughInnerOuterJoin.java
similarity index 95%
rename from
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/PushdownProjectThroughInnerOuterJoin.java
rename to
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/PushDownProjectThroughInnerOuterJoin.java
index 03fd3e8a8d8..6a74e7c98d9 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/PushdownProjectThroughInnerOuterJoin.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/PushDownProjectThroughInnerOuterJoin.java
@@ -50,8 +50,8 @@ import java.util.stream.Collectors;
* A B A B
* </pre>
*/
-public class PushdownProjectThroughInnerOuterJoin implements
ExplorationRuleFactory {
- public static final PushdownProjectThroughInnerOuterJoin INSTANCE = new
PushdownProjectThroughInnerOuterJoin();
+public class PushDownProjectThroughInnerOuterJoin implements
ExplorationRuleFactory {
+ public static final PushDownProjectThroughInnerOuterJoin INSTANCE = new
PushDownProjectThroughInnerOuterJoin();
@Override
public List<Rule> buildRules() {
@@ -69,7 +69,7 @@ public class PushdownProjectThroughInnerOuterJoin implements
ExplorationRuleFact
return null;
}
return topJoin.withChildren(newLeft,
topJoin.right());
-
}).toRule(RuleType.PUSHDOWN_PROJECT_THROUGH_INNER_OUTER_JOIN_LEFT),
+
}).toRule(RuleType.PUSH_DOWN_PROJECT_THROUGH_INNER_OUTER_JOIN_LEFT),
logicalJoin(group(),
logicalProject(logicalJoin().whenNot(LogicalJoin::isMarkJoin)))
.when(j ->
j.right().child().getJoinType().isOuterJoin()
||
j.right().child().getJoinType().isInnerJoin())
@@ -83,7 +83,7 @@ public class PushdownProjectThroughInnerOuterJoin implements
ExplorationRuleFact
return null;
}
return topJoin.withChildren(topJoin.left(),
newRight);
-
}).toRule(RuleType.PUSHDOWN_PROJECT_THROUGH_INNER_OUTER_JOIN_RIGHT)
+
}).toRule(RuleType.PUSH_DOWN_PROJECT_THROUGH_INNER_OUTER_JOIN_RIGHT)
);
}
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/PushdownProjectThroughSemiJoin.java
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/PushDownProjectThroughSemiJoin.java
similarity index 92%
rename from
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/PushdownProjectThroughSemiJoin.java
rename to
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/PushDownProjectThroughSemiJoin.java
index 12199408236..f2a33b78a6c 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/PushdownProjectThroughSemiJoin.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/PushDownProjectThroughSemiJoin.java
@@ -48,8 +48,8 @@ import java.util.stream.Collectors;
* A B A
* </pre>
*/
-public class PushdownProjectThroughSemiJoin implements ExplorationRuleFactory {
- public static final PushdownProjectThroughSemiJoin INSTANCE = new
PushdownProjectThroughSemiJoin();
+public class PushDownProjectThroughSemiJoin implements ExplorationRuleFactory {
+ public static final PushDownProjectThroughSemiJoin INSTANCE = new
PushDownProjectThroughSemiJoin();
@Override
public List<Rule> buildRules() {
@@ -63,7 +63,7 @@ public class PushdownProjectThroughSemiJoin implements
ExplorationRuleFactory {
LogicalProject<LogicalJoin<GroupPlan, GroupPlan>>
project = topJoin.left();
Plan newLeft = pushdownProject(project);
return topJoin.withChildren(newLeft, topJoin.right());
-
}).toRule(RuleType.PUSHDOWN_PROJECT_THROUGH_SEMI_JOIN_LEFT),
+
}).toRule(RuleType.PUSH_DOWN_PROJECT_THROUGH_SEMI_JOIN_LEFT),
logicalJoin(group(),
logicalProject(logicalJoin().whenNot(LogicalJoin::isMarkJoin)))
.when(j ->
j.right().child().getJoinType().isLeftSemiOrAntiJoin())
@@ -74,7 +74,7 @@ public class PushdownProjectThroughSemiJoin implements
ExplorationRuleFactory {
LogicalProject<LogicalJoin<GroupPlan, GroupPlan>>
project = topJoin.right();
Plan newRight = pushdownProject(project);
return topJoin.withChildren(topJoin.left(), newRight);
-
}).toRule(RuleType.PUSHDOWN_PROJECT_THROUGH_SEMI_JOIN_RIGHT)
+
}).toRule(RuleType.PUSH_DOWN_PROJECT_THROUGH_SEMI_JOIN_RIGHT)
);
}
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushdownAliasIntoUnionAll.java
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownAliasIntoUnionAll.java
similarity index 96%
rename from
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushdownAliasIntoUnionAll.java
rename to
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownAliasIntoUnionAll.java
index 20f202a3b2b..e3f9fb021bd 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushdownAliasIntoUnionAll.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownAliasIntoUnionAll.java
@@ -45,7 +45,7 @@ import java.util.stream.Collectors;
* UnionAll output(c1, c2 as c2t, c3)
* </pre>
*/
-public class PushdownAliasIntoUnionAll extends OneRewriteRuleFactory {
+public class PushDownAliasIntoUnionAll extends OneRewriteRuleFactory {
@Override
public Rule build() {
return logicalProject(logicalUnion())
@@ -80,6 +80,6 @@ public class PushdownAliasIntoUnionAll extends
OneRewriteRuleFactory {
List<NamedExpression> newProjects =
project.getProjects().stream().map(NamedExpression::toSlot)
.collect(Collectors.toList());
return PlanUtils.projectOrSelf(newProjects,
union.withNewOutputs(newOutput));
- }).toRule(RuleType.PUSHDOWN_ALIAS_INTO_UNION_ALL);
+ }).toRule(RuleType.PUSH_DOWN_ALIAS_INTO_UNION_ALL);
}
}
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushdownAliasThroughJoin.java
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownAliasThroughJoin.java
similarity index 98%
rename from
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushdownAliasThroughJoin.java
rename to
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownAliasThroughJoin.java
index abe707b2608..a544dfa361e 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushdownAliasThroughJoin.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownAliasThroughJoin.java
@@ -42,7 +42,7 @@ import java.util.stream.Stream;
/**
* Pushdown Alias (inside must be Slot) through Join.
*/
-public class PushdownAliasThroughJoin extends OneRewriteRuleFactory {
+public class PushDownAliasThroughJoin extends OneRewriteRuleFactory {
@Override
public Rule build() {
return logicalProject(logicalJoin())
@@ -99,7 +99,7 @@ public class PushdownAliasThroughJoin extends
OneRewriteRuleFactory {
Plan newJoin = join.withConjunctsChildren(newHash, newOther,
left, right);
return project.withProjectsAndChild(newProjects, newJoin);
- }).toRule(RuleType.PUSHDOWN_ALIAS_THROUGH_JOIN);
+ }).toRule(RuleType.PUSH_DOWN_ALIAS_THROUGH_JOIN);
}
private List<Expression> replaceJoinConjuncts(List<Expression>
joinConjuncts, Map<ExprId, Slot> replaceMaps) {
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushdownCountThroughJoin.java
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownCountThroughJoin.java
similarity index 97%
rename from
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushdownCountThroughJoin.java
rename to
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownCountThroughJoin.java
index 856a67d0482..462180ab7a6 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushdownCountThroughJoin.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownCountThroughJoin.java
@@ -67,7 +67,7 @@ import java.util.Set;
* </pre>
* Notice: rule can't optimize condition that groupby is empty when Count(*)
exists.
*/
-public class PushdownCountThroughJoin implements RewriteRuleFactory {
+public class PushDownCountThroughJoin implements RewriteRuleFactory {
@Override
public List<Rule> buildRules() {
return ImmutableList.of(
@@ -84,13 +84,13 @@ public class PushdownCountThroughJoin implements
RewriteRuleFactory {
.thenApply(ctx -> {
Set<Integer> enableNereidsRules =
ctx.cascadesContext.getConnectContext()
.getSessionVariable().getEnableNereidsRules();
- if
(!enableNereidsRules.contains(RuleType.PUSHDOWN_COUNT_THROUGH_JOIN.type())) {
+ if
(!enableNereidsRules.contains(RuleType.PUSH_DOWN_COUNT_THROUGH_JOIN.type())) {
return null;
}
LogicalAggregate<LogicalJoin<Plan, Plan>> agg =
ctx.root;
return pushCount(agg, agg.child(),
ImmutableList.of());
})
- .toRule(RuleType.PUSHDOWN_COUNT_THROUGH_JOIN),
+ .toRule(RuleType.PUSH_DOWN_COUNT_THROUGH_JOIN),
logicalAggregate(logicalProject(innerLogicalJoin()))
.when(agg -> agg.child().isAllSlots())
.when(agg ->
agg.child().child().getOtherJoinConjuncts().isEmpty())
@@ -105,13 +105,13 @@ public class PushdownCountThroughJoin implements
RewriteRuleFactory {
.thenApply(ctx -> {
Set<Integer> enableNereidsRules =
ctx.cascadesContext.getConnectContext()
.getSessionVariable().getEnableNereidsRules();
- if
(!enableNereidsRules.contains(RuleType.PUSHDOWN_COUNT_THROUGH_JOIN.type())) {
+ if
(!enableNereidsRules.contains(RuleType.PUSH_DOWN_COUNT_THROUGH_JOIN.type())) {
return null;
}
LogicalAggregate<LogicalProject<LogicalJoin<Plan,
Plan>>> agg = ctx.root;
return pushCount(agg, agg.child().child(),
agg.child().getProjects());
})
- .toRule(RuleType.PUSHDOWN_COUNT_THROUGH_JOIN)
+ .toRule(RuleType.PUSH_DOWN_COUNT_THROUGH_JOIN)
);
}
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushdownDistinctThroughJoin.java
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownDistinctThroughJoin.java
similarity index 96%
rename from
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushdownDistinctThroughJoin.java
rename to
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownDistinctThroughJoin.java
index ac239e8f95d..fa705a08d8d 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushdownDistinctThroughJoin.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownDistinctThroughJoin.java
@@ -36,12 +36,12 @@ import java.util.function.Function;
/**
* PushdownDistinctThroughJoin
*/
-public class PushdownDistinctThroughJoin extends
DefaultPlanRewriter<JobContext> implements CustomRewriter {
+public class PushDownDistinctThroughJoin extends
DefaultPlanRewriter<JobContext> implements CustomRewriter {
@Override
public Plan rewriteRoot(Plan plan, JobContext context) {
Set<Integer> enableNereidsRules =
context.getCascadesContext().getConnectContext()
.getSessionVariable().getEnableNereidsRules();
- if
(!enableNereidsRules.contains(RuleType.PUSHDOWN_DISTINCT_THROUGH_JOIN.type())) {
+ if
(!enableNereidsRules.contains(RuleType.PUSH_DOWN_DISTINCT_THROUGH_JOIN.type()))
{
return null;
}
return plan.accept(this, context);
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushdownExpressionsInHashCondition.java
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownExpressionsInHashCondition.java
similarity index 96%
rename from
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushdownExpressionsInHashCondition.java
rename to
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownExpressionsInHashCondition.java
index df7acb4553c..4aeb47a9d48 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushdownExpressionsInHashCondition.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownExpressionsInHashCondition.java
@@ -43,7 +43,7 @@ import java.util.Set;
/**
* push down expression which is not slot reference
*/
-public class PushdownExpressionsInHashCondition extends OneRewriteRuleFactory {
+public class PushDownExpressionsInHashCondition extends OneRewriteRuleFactory {
/*
* rewrite example:
* join(t1.a + 1 = t2.b + 2) join(c = d)
@@ -64,8 +64,8 @@ public class PushdownExpressionsInHashCondition extends
OneRewriteRuleFactory {
return logicalJoin()
.when(join ->
join.getHashJoinConjuncts().stream().anyMatch(equalTo ->
equalTo.children().stream().anyMatch(e -> !(e
instanceof Slot))))
-
.then(PushdownExpressionsInHashCondition::pushDownHashExpression)
- .toRule(RuleType.PUSHDOWN_EXPRESSIONS_IN_HASH_CONDITIONS);
+
.then(PushDownExpressionsInHashCondition::pushDownHashExpression)
+ .toRule(RuleType.PUSH_DOWN_EXPRESSIONS_IN_HASH_CONDITIONS);
}
/**
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushdownFilterThroughAggregation.java
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownFilterThroughAggregation.java
similarity index 96%
rename from
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushdownFilterThroughAggregation.java
rename to
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownFilterThroughAggregation.java
index 45fa1c645b2..f3a54fd8eea 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushdownFilterThroughAggregation.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownFilterThroughAggregation.java
@@ -52,7 +52,7 @@ import java.util.Set;
* but 'b>0' could not push down, because 'b' is not in group by keys.
*/
-public class PushdownFilterThroughAggregation extends OneRewriteRuleFactory {
+public class PushDownFilterThroughAggregation extends OneRewriteRuleFactory {
@Override
public Rule build() {
@@ -77,7 +77,7 @@ public class PushdownFilterThroughAggregation extends
OneRewriteRuleFactory {
Plan bottomFilter = new LogicalFilter<>(pushDownPredicates,
aggregate.child(0));
aggregate = aggregate.withChildren(ImmutableList.of(bottomFilter));
return PlanUtils.filterOrSelf(filterPredicates, aggregate);
- }).toRule(RuleType.PUSHDOWN_PREDICATE_THROUGH_AGGREGATION);
+ }).toRule(RuleType.PUSH_DOWN_PREDICATE_THROUGH_AGGREGATION);
}
/**
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushdownFilterThroughJoin.java
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownFilterThroughJoin.java
similarity index 96%
rename from
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushdownFilterThroughJoin.java
rename to
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownFilterThroughJoin.java
index f6d1a3ce489..9165a95b6c6 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushdownFilterThroughJoin.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownFilterThroughJoin.java
@@ -38,8 +38,8 @@ import java.util.Set;
/**
* Push the predicate in the LogicalFilter to the join children.
*/
-public class PushdownFilterThroughJoin extends OneRewriteRuleFactory {
- public static final PushdownFilterThroughJoin INSTANCE = new
PushdownFilterThroughJoin();
+public class PushDownFilterThroughJoin extends OneRewriteRuleFactory {
+ public static final PushDownFilterThroughJoin INSTANCE = new
PushDownFilterThroughJoin();
private static final ImmutableList<JoinType> COULD_PUSH_THROUGH_LEFT =
ImmutableList.of(
JoinType.INNER_JOIN,
@@ -141,7 +141,7 @@ public class PushdownFilterThroughJoin extends
OneRewriteRuleFactory {
join.getMarkJoinSlotReference(),
PlanUtils.filterOrSelf(leftPredicates,
join.left()),
PlanUtils.filterOrSelf(rightPredicates,
join.right())));
- }).toRule(RuleType.PUSHDOWN_FILTER_THROUGH_JOIN);
+ }).toRule(RuleType.PUSH_DOWN_FILTER_THROUGH_JOIN);
}
private boolean convertJoinCondition(Expression predicate, Set<Slot>
leftOutputs, Set<Slot> rightOutputs,
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushdownFilterThroughPartitionTopN.java
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownFilterThroughPartitionTopN.java
similarity index 96%
rename from
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushdownFilterThroughPartitionTopN.java
rename to
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownFilterThroughPartitionTopN.java
index da31fb2ae3d..4cb8076f7a4 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushdownFilterThroughPartitionTopN.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownFilterThroughPartitionTopN.java
@@ -51,7 +51,7 @@ import java.util.Set;
* any_node
*/
-public class PushdownFilterThroughPartitionTopN extends OneRewriteRuleFactory {
+public class PushDownFilterThroughPartitionTopN extends OneRewriteRuleFactory {
@Override
public Rule build() {
@@ -91,7 +91,7 @@ public class PushdownFilterThroughPartitionTopN extends
OneRewriteRuleFactory {
} else {
return filter.withConjunctsAndChild(upperConjuncts,
partitionTopN);
}
- }).toRule(RuleType.PUSHDOWN_FILTER_THROUGH_PARTITION_TOPN);
+ }).toRule(RuleType.PUSH_DOWN_FILTER_THROUGH_PARTITION_TOPN);
}
}
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushdownFilterThroughProject.java
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownFilterThroughProject.java
similarity index 92%
rename from
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushdownFilterThroughProject.java
rename to
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownFilterThroughProject.java
index a0d64b1a609..65106ff8f81 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushdownFilterThroughProject.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownFilterThroughProject.java
@@ -37,15 +37,15 @@ import java.util.List;
* output:
* project(c+d as a, e as b) -> filter(c+d>2, e=0).
*/
-public class PushdownFilterThroughProject implements RewriteRuleFactory {
+public class PushDownFilterThroughProject implements RewriteRuleFactory {
@Override
public List<Rule> buildRules() {
return ImmutableList.of(
logicalFilter(logicalProject())
.whenNot(filter ->
filter.child().getProjects().stream().anyMatch(
expr ->
expr.anyMatch(WindowExpression.class::isInstance)))
-
.then(PushdownFilterThroughProject::pushdownFilterThroughProject)
- .toRule(RuleType.PUSHDOWN_FILTER_THROUGH_PROJECT),
+
.then(PushDownFilterThroughProject::pushdownFilterThroughProject)
+ .toRule(RuleType.PUSH_DOWN_FILTER_THROUGH_PROJECT),
// filter(project(limit)) will change to
filter(limit(project)) by PushdownProjectThroughLimit,
// then we should change filter(limit(project)) to
project(filter(limit))
logicalFilter(logicalLimit(logicalProject()))
@@ -60,7 +60,7 @@ public class PushdownFilterThroughProject implements
RewriteRuleFactory {
ExpressionUtils.replace(filter.getConjuncts(),
project.getAliasToProducer()),
limit.withChildren(project.child())));
-
}).toRule(RuleType.PUSHDOWN_FILTER_THROUGH_PROJECT_UNDER_LIMIT)
+
}).toRule(RuleType.PUSH_DOWN_FILTER_THROUGH_PROJECT_UNDER_LIMIT)
);
}
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushdownFilterThroughRepeat.java
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownFilterThroughRepeat.java
similarity index 96%
rename from
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushdownFilterThroughRepeat.java
rename to
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownFilterThroughRepeat.java
index 804075c1dfe..3fd743b3753 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushdownFilterThroughRepeat.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownFilterThroughRepeat.java
@@ -57,7 +57,7 @@ import java.util.Set;
* but 'b>0' could not push down, because 'b' is not in group by keys.
*/
-public class PushdownFilterThroughRepeat extends OneRewriteRuleFactory {
+public class PushDownFilterThroughRepeat extends OneRewriteRuleFactory {
@Override
public Rule build() {
@@ -79,7 +79,7 @@ public class PushdownFilterThroughRepeat extends
OneRewriteRuleFactory {
}
}
return pushDownPredicate(filter, pushedPredicates,
notPushedPredicates);
- }).toRule(RuleType.PUSHDOWN_PREDICATE_THROUGH_REPEAT);
+ }).toRule(RuleType.PUSH_DOWN_PREDICATE_THROUGH_REPEAT);
}
private Plan pushDownPredicate(LogicalFilter<LogicalRepeat<Plan>> filter,
Set<Expression> pushedPredicates,
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushdownFilterThroughSetOperation.java
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownFilterThroughSetOperation.java
similarity index 95%
rename from
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushdownFilterThroughSetOperation.java
rename to
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownFilterThroughSetOperation.java
index 6b78ab1f367..c8f83d62b49 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushdownFilterThroughSetOperation.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownFilterThroughSetOperation.java
@@ -37,7 +37,7 @@ import java.util.Set;
/**
* Convert the expression in the filter into the output column corresponding
to the child node and push it down.
*/
-public class PushdownFilterThroughSetOperation extends OneRewriteRuleFactory {
+public class PushDownFilterThroughSetOperation extends OneRewriteRuleFactory {
@Override
public Rule build() {
@@ -57,6 +57,6 @@ public class PushdownFilterThroughSetOperation extends
OneRewriteRuleFactory {
}
return setOperation.withChildren(newChildren);
- }).toRule(RuleType.PUSHDOWN_FILTER_THROUGH_SET_OPERATION);
+ }).toRule(RuleType.PUSH_DOWN_FILTER_THROUGH_SET_OPERATION);
}
}
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushdownFilterThroughSort.java
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownFilterThroughSort.java
similarity index 94%
rename from
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushdownFilterThroughSort.java
rename to
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownFilterThroughSort.java
index fc2216184c1..75b6806b78e 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushdownFilterThroughSort.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownFilterThroughSort.java
@@ -36,7 +36,7 @@ import java.util.Set;
* The filter can be directly push down to the sort.
* Note when the sort key is equal to Literal, the sort can be eliminated
*/
-public class PushdownFilterThroughSort extends OneRewriteRuleFactory {
+public class PushDownFilterThroughSort extends OneRewriteRuleFactory {
@Override
public Rule build() {
return logicalFilter(logicalSort()).then(filter -> {
@@ -45,7 +45,7 @@ public class PushdownFilterThroughSort extends
OneRewriteRuleFactory {
return new LogicalFilter<>(filter.getConjuncts(),
sort.child());
}
return sort.withChildren(new
LogicalFilter<>(filter.getConjuncts(), sort.child()));
- }).toRule(RuleType.PUSHDOWN_FILTER_THROUGH_SORT);
+ }).toRule(RuleType.PUSH_DOWN_FILTER_THROUGH_SORT);
}
boolean checkSlotsConstant(Set<Slot> slots, LogicalFilter<? extends Plan>
filter) {
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushdownFilterThroughWindow.java
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownFilterThroughWindow.java
similarity index 96%
rename from
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushdownFilterThroughWindow.java
rename to
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownFilterThroughWindow.java
index 1902ff50300..0696bdd95c0 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushdownFilterThroughWindow.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownFilterThroughWindow.java
@@ -49,7 +49,7 @@ import java.util.Set;
* any_node
*/
-public class PushdownFilterThroughWindow extends OneRewriteRuleFactory {
+public class PushDownFilterThroughWindow extends OneRewriteRuleFactory {
@Override
public Rule build() {
@@ -92,7 +92,7 @@ public class PushdownFilterThroughWindow extends
OneRewriteRuleFactory {
.withConjuncts(upperConjuncts).withChildren(window);
return upperFilter;
}
- }).toRule(RuleType.PUSHDOWN_FILTER_THROUGH_WINDOW);
+ }).toRule(RuleType.PUSH_DOWN_FILTER_THROUGH_WINDOW);
}
}
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushdownJoinOtherCondition.java
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownJoinOtherCondition.java
similarity index 97%
rename from
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushdownJoinOtherCondition.java
rename to
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownJoinOtherCondition.java
index 27285aa897d..778a8729f2e 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushdownJoinOtherCondition.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownJoinOtherCondition.java
@@ -37,7 +37,7 @@ import java.util.Set;
/**
* Push the other join conditions in LogicalJoin to children.
*/
-public class PushdownJoinOtherCondition extends OneRewriteRuleFactory {
+public class PushDownJoinOtherCondition extends OneRewriteRuleFactory {
private static final ImmutableList<JoinType> PUSH_DOWN_LEFT_VALID_TYPE =
ImmutableList.of(
JoinType.INNER_JOIN,
JoinType.LEFT_SEMI_JOIN,
@@ -91,7 +91,7 @@ public class PushdownJoinOtherCondition extends
OneRewriteRuleFactory {
return new LogicalJoin<>(join.getJoinType(),
join.getHashJoinConjuncts(),
remainingOther, join.getHint(),
join.getMarkJoinSlotReference(), left, right);
- }).toRule(RuleType.PUSHDOWN_JOIN_OTHER_CONDITION);
+ }).toRule(RuleType.PUSH_DOWN_JOIN_OTHER_CONDITION);
}
private boolean allCoveredBy(Expression predicate, Set<Slot> inputSlotSet)
{
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushdownLimit.java
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownLimit.java
similarity index 99%
rename from
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushdownLimit.java
rename to
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownLimit.java
index 5964d741fc1..69a7faa6aa7 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushdownLimit.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownLimit.java
@@ -39,7 +39,7 @@ import java.util.Optional;
* Limit can't be push down if it has a valid offset info.
* splitLimit run before this rule, so the limit match the patterns is local
limit
*/
-public class PushdownLimit implements RewriteRuleFactory {
+public class PushDownLimit implements RewriteRuleFactory {
@Override
public List<Rule> buildRules() {
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushdownLimitDistinctThroughJoin.java
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownLimitDistinctThroughJoin.java
similarity index 98%
rename from
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushdownLimitDistinctThroughJoin.java
rename to
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownLimitDistinctThroughJoin.java
index 24737b63625..9ba73c7ed8f 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushdownLimitDistinctThroughJoin.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownLimitDistinctThroughJoin.java
@@ -34,7 +34,7 @@ import java.util.stream.Collectors;
/**
* Same with PushdownLimit
*/
-public class PushdownLimitDistinctThroughJoin implements RewriteRuleFactory {
+public class PushDownLimitDistinctThroughJoin implements RewriteRuleFactory {
@Override
public List<Rule> buildRules() {
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushdownMinMaxThroughJoin.java
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownMinMaxThroughJoin.java
similarity index 96%
rename from
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushdownMinMaxThroughJoin.java
rename to
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownMinMaxThroughJoin.java
index 07f0bbc81c7..48ded00defe 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushdownMinMaxThroughJoin.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownMinMaxThroughJoin.java
@@ -61,7 +61,7 @@ import java.util.Set;
* aggregate: Min/Max(x) as min1
* </pre>
*/
-public class PushdownMinMaxThroughJoin implements RewriteRuleFactory {
+public class PushDownMinMaxThroughJoin implements RewriteRuleFactory {
@Override
public List<Rule> buildRules() {
return ImmutableList.of(
@@ -77,13 +77,13 @@ public class PushdownMinMaxThroughJoin implements
RewriteRuleFactory {
.thenApply(ctx -> {
Set<Integer> enableNereidsRules =
ctx.cascadesContext.getConnectContext()
.getSessionVariable().getEnableNereidsRules();
- if
(!enableNereidsRules.contains(RuleType.PUSHDOWN_MIN_MAX_THROUGH_JOIN.type())) {
+ if
(!enableNereidsRules.contains(RuleType.PUSH_DOWN_MIN_MAX_THROUGH_JOIN.type())) {
return null;
}
LogicalAggregate<LogicalJoin<Plan, Plan>> agg =
ctx.root;
return pushMinMax(agg, agg.child(),
ImmutableList.of());
})
- .toRule(RuleType.PUSHDOWN_MIN_MAX_THROUGH_JOIN),
+ .toRule(RuleType.PUSH_DOWN_MIN_MAX_THROUGH_JOIN),
logicalAggregate(logicalProject(innerLogicalJoin()))
.when(agg -> agg.child().isAllSlots())
.when(agg ->
agg.child().child().getOtherJoinConjuncts().isEmpty())
@@ -98,13 +98,13 @@ public class PushdownMinMaxThroughJoin implements
RewriteRuleFactory {
.thenApply(ctx -> {
Set<Integer> enableNereidsRules =
ctx.cascadesContext.getConnectContext()
.getSessionVariable().getEnableNereidsRules();
- if
(!enableNereidsRules.contains(RuleType.PUSHDOWN_MIN_MAX_THROUGH_JOIN.type())) {
+ if
(!enableNereidsRules.contains(RuleType.PUSH_DOWN_MIN_MAX_THROUGH_JOIN.type())) {
return null;
}
LogicalAggregate<LogicalProject<LogicalJoin<Plan,
Plan>>> agg = ctx.root;
return pushMinMax(agg, agg.child().child(),
agg.child().getProjects());
})
- .toRule(RuleType.PUSHDOWN_MIN_MAX_THROUGH_JOIN)
+ .toRule(RuleType.PUSH_DOWN_MIN_MAX_THROUGH_JOIN)
);
}
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushdownProjectThroughLimit.java
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownProjectThroughLimit.java
similarity index 93%
rename from
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushdownProjectThroughLimit.java
rename to
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownProjectThroughLimit.java
index 8c4d2a93c56..ca04043e84f 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushdownProjectThroughLimit.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownProjectThroughLimit.java
@@ -45,7 +45,7 @@ import
org.apache.doris.nereids.trees.plans.logical.LogicalProject;
* plan node
* </pre>
*/
-public class PushdownProjectThroughLimit extends OneRewriteRuleFactory {
+public class PushDownProjectThroughLimit extends OneRewriteRuleFactory {
@Override
public Rule build() {
@@ -53,6 +53,6 @@ public class PushdownProjectThroughLimit extends
OneRewriteRuleFactory {
LogicalProject<LogicalLimit<Plan>> logicalProject = ctx.root;
LogicalLimit<Plan> logicalLimit = logicalProject.child();
return
logicalLimit.withChildren(logicalProject.withChildren(logicalLimit.child()));
- }).toRule(RuleType.PUSHDOWN_PROJECT_THROUGH_LIMIT);
+ }).toRule(RuleType.PUSH_DOWN_PROJECT_THROUGH_LIMIT);
}
}
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushdownSumThroughJoin.java
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownSumThroughJoin.java
similarity index 96%
rename from
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushdownSumThroughJoin.java
rename to
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownSumThroughJoin.java
index 0ae16a07014..91cb2a6050b 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushdownSumThroughJoin.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownSumThroughJoin.java
@@ -61,7 +61,7 @@ import java.util.Set;
* aggregate: Sum(x) as min1
* </pre>
*/
-public class PushdownSumThroughJoin implements RewriteRuleFactory {
+public class PushDownSumThroughJoin implements RewriteRuleFactory {
@Override
public List<Rule> buildRules() {
return ImmutableList.of(
@@ -76,13 +76,13 @@ public class PushdownSumThroughJoin implements
RewriteRuleFactory {
.thenApply(ctx -> {
Set<Integer> enableNereidsRules =
ctx.cascadesContext.getConnectContext()
.getSessionVariable().getEnableNereidsRules();
- if
(!enableNereidsRules.contains(RuleType.PUSHDOWN_SUM_THROUGH_JOIN.type())) {
+ if
(!enableNereidsRules.contains(RuleType.PUSH_DOWN_SUM_THROUGH_JOIN.type())) {
return null;
}
LogicalAggregate<LogicalJoin<Plan, Plan>> agg =
ctx.root;
return pushSum(agg, agg.child(),
ImmutableList.of());
})
- .toRule(RuleType.PUSHDOWN_SUM_THROUGH_JOIN),
+ .toRule(RuleType.PUSH_DOWN_SUM_THROUGH_JOIN),
logicalAggregate(logicalProject(innerLogicalJoin()))
.when(agg -> agg.child().isAllSlots())
.when(agg ->
agg.child().child().getOtherJoinConjuncts().isEmpty())
@@ -95,13 +95,13 @@ public class PushdownSumThroughJoin implements
RewriteRuleFactory {
.thenApply(ctx -> {
Set<Integer> enableNereidsRules =
ctx.cascadesContext.getConnectContext()
.getSessionVariable().getEnableNereidsRules();
- if
(!enableNereidsRules.contains(RuleType.PUSHDOWN_SUM_THROUGH_JOIN.type())) {
+ if
(!enableNereidsRules.contains(RuleType.PUSH_DOWN_SUM_THROUGH_JOIN.type())) {
return null;
}
LogicalAggregate<LogicalProject<LogicalJoin<Plan,
Plan>>> agg = ctx.root;
return pushSum(agg, agg.child().child(),
agg.child().getProjects());
})
- .toRule(RuleType.PUSHDOWN_SUM_THROUGH_JOIN)
+ .toRule(RuleType.PUSH_DOWN_SUM_THROUGH_JOIN)
);
}
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushdownTopNThroughJoin.java
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownTopNThroughJoin.java
similarity index 98%
rename from
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushdownTopNThroughJoin.java
rename to
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownTopNThroughJoin.java
index b025d40b6d7..de4d5c9725c 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushdownTopNThroughJoin.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownTopNThroughJoin.java
@@ -35,7 +35,7 @@ import java.util.stream.Collectors;
/**
* Push down TopN through Outer Join into left child .....
*/
-public class PushdownTopNThroughJoin implements RewriteRuleFactory {
+public class PushDownTopNThroughJoin implements RewriteRuleFactory {
@Override
public List<Rule> buildRules() {
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushdownTopNThroughWindow.java
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownTopNThroughWindow.java
similarity index 98%
rename from
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushdownTopNThroughWindow.java
rename to
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownTopNThroughWindow.java
index f1547d91089..11dd2b79597 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushdownTopNThroughWindow.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownTopNThroughWindow.java
@@ -38,7 +38,7 @@ import java.util.Optional;
/**
* PushdownTopNThroughWindow push down the TopN through the Window and
generate the PartitionTopN.
*/
-public class PushdownTopNThroughWindow implements RewriteRuleFactory {
+public class PushDownTopNThroughWindow implements RewriteRuleFactory {
@Override
public List<Rule> buildRules() {
return ImmutableList.of(
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/TransposeSemiJoinAgg.java
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/TransposeSemiJoinAgg.java
index 1a8c4ca1e52..864b5bb03a8 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/TransposeSemiJoinAgg.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/TransposeSemiJoinAgg.java
@@ -50,7 +50,7 @@ public class TransposeSemiJoinAgg extends
OneRewriteRuleFactory {
*/
public static boolean canTranspose(LogicalAggregate<? extends Plan>
aggregate,
LogicalJoin<? extends Plan, ? extends Plan> join) {
- Set<Slot> canPushDownSlots =
PushdownFilterThroughAggregation.getCanPushDownSlots(aggregate);
+ Set<Slot> canPushDownSlots =
PushDownFilterThroughAggregation.getCanPushDownSlots(aggregate);
Set<Slot> leftConditionSlot = join.getLeftConditionSlot();
return canPushDownSlots.containsAll(leftConditionSlot);
}
diff --git
a/fe/fe-core/src/test/java/org/apache/doris/nereids/postprocess/PushdownFilterThroughProjectTest.java
b/fe/fe-core/src/test/java/org/apache/doris/nereids/postprocess/PushDownFilterThroughProjectTest.java
similarity index 96%
rename from
fe/fe-core/src/test/java/org/apache/doris/nereids/postprocess/PushdownFilterThroughProjectTest.java
rename to
fe/fe-core/src/test/java/org/apache/doris/nereids/postprocess/PushDownFilterThroughProjectTest.java
index 46130efbcbd..b817f800008 100644
---
a/fe/fe-core/src/test/java/org/apache/doris/nereids/postprocess/PushdownFilterThroughProjectTest.java
+++
b/fe/fe-core/src/test/java/org/apache/doris/nereids/postprocess/PushDownFilterThroughProjectTest.java
@@ -20,7 +20,7 @@ package org.apache.doris.nereids.postprocess;
import org.apache.doris.catalog.KeysType;
import org.apache.doris.catalog.OlapTable;
import org.apache.doris.nereids.CascadesContext;
-import org.apache.doris.nereids.processor.post.PushdownFilterThroughProject;
+import org.apache.doris.nereids.processor.post.PushDownFilterThroughProject;
import org.apache.doris.nereids.properties.LogicalProperties;
import org.apache.doris.nereids.trees.expressions.Alias;
import org.apache.doris.nereids.trees.expressions.EqualTo;
@@ -51,7 +51,7 @@ import java.util.List;
import java.util.Optional;
import java.util.Set;
-public class PushdownFilterThroughProjectTest {
+public class PushDownFilterThroughProjectTest {
/**
* filter(y=0)
* |
@@ -101,7 +101,7 @@ public class PushdownFilterThroughProjectTest {
conjuncts.add(new EqualTo(y.toSlot(), Literal.of(0)));
PhysicalFilter filter = new PhysicalFilter(conjuncts,
proj2.getLogicalProperties(), proj2);
- PushdownFilterThroughProject processor = new
PushdownFilterThroughProject();
+ PushDownFilterThroughProject processor = new
PushDownFilterThroughProject();
PhysicalPlan newPlan = (PhysicalPlan) filter.accept(processor, ctx);
Assertions.assertTrue(newPlan instanceof PhysicalProject);
Assertions.assertTrue(newPlan.child(0) instanceof PhysicalProject);
diff --git
a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/exploration/join/InnerJoinLAsscomProjectTest.java
b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/exploration/join/InnerJoinLAsscomProjectTest.java
index e9ad622e854..c6fbb8af38f 100644
---
a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/exploration/join/InnerJoinLAsscomProjectTest.java
+++
b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/exploration/join/InnerJoinLAsscomProjectTest.java
@@ -18,7 +18,7 @@
package org.apache.doris.nereids.rules.exploration.join;
import org.apache.doris.common.Pair;
-import org.apache.doris.nereids.rules.rewrite.PushdownAliasThroughJoin;
+import org.apache.doris.nereids.rules.rewrite.PushDownAliasThroughJoin;
import org.apache.doris.nereids.trees.expressions.Add;
import org.apache.doris.nereids.trees.expressions.Cast;
import org.apache.doris.nereids.trees.expressions.EqualTo;
@@ -102,7 +102,7 @@ class InnerJoinLAsscomProjectTest implements
MemoPatternMatchSupported {
.build();
PlanChecker.from(MemoTestUtils.createConnectContext(), plan)
- .applyTopDown(new PushdownAliasThroughJoin())
+ .applyTopDown(new PushDownAliasThroughJoin())
.applyExploration(InnerJoinLAsscomProject.INSTANCE.build())
.printlnExploration()
.matchesExploration(
@@ -148,7 +148,7 @@ class InnerJoinLAsscomProjectTest implements
MemoPatternMatchSupported {
PlanChecker.from(MemoTestUtils.createConnectContext(), topJoin)
.printlnTree()
- .applyTopDown(new PushdownAliasThroughJoin())
+ .applyTopDown(new PushDownAliasThroughJoin())
.applyExploration(InnerJoinLAsscomProject.INSTANCE.build())
.printlnExploration()
.matchesExploration(
diff --git
a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/exploration/join/OuterJoinLAsscomProjectTest.java
b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/exploration/join/OuterJoinLAsscomProjectTest.java
index f00dac49609..b621af0e5d1 100644
---
a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/exploration/join/OuterJoinLAsscomProjectTest.java
+++
b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/exploration/join/OuterJoinLAsscomProjectTest.java
@@ -18,7 +18,7 @@
package org.apache.doris.nereids.rules.exploration.join;
import org.apache.doris.common.Pair;
-import org.apache.doris.nereids.rules.rewrite.PushdownAliasThroughJoin;
+import org.apache.doris.nereids.rules.rewrite.PushDownAliasThroughJoin;
import org.apache.doris.nereids.trees.expressions.EqualTo;
import org.apache.doris.nereids.trees.expressions.Expression;
import org.apache.doris.nereids.trees.expressions.GreaterThan;
@@ -79,7 +79,7 @@ class OuterJoinLAsscomProjectTest implements
MemoPatternMatchSupported {
.build();
PlanChecker.from(MemoTestUtils.createConnectContext(), plan)
- .applyTopDown(new PushdownAliasThroughJoin())
+ .applyTopDown(new PushDownAliasThroughJoin())
.printlnTree()
.applyExploration(OuterJoinLAsscomProject.INSTANCE.build())
.printlnExploration()
diff --git
a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/exploration/join/PushdownProjectThroughInnerOuterJoinTest.java
b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/exploration/join/PushDownProjectThroughInnerOuterJoinTest.java
similarity index 96%
rename from
fe/fe-core/src/test/java/org/apache/doris/nereids/rules/exploration/join/PushdownProjectThroughInnerOuterJoinTest.java
rename to
fe/fe-core/src/test/java/org/apache/doris/nereids/rules/exploration/join/PushDownProjectThroughInnerOuterJoinTest.java
index 19be848332d..ef4e2ee5134 100644
---
a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/exploration/join/PushdownProjectThroughInnerOuterJoinTest.java
+++
b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/exploration/join/PushDownProjectThroughInnerOuterJoinTest.java
@@ -37,7 +37,7 @@ import org.junit.jupiter.api.Test;
import java.util.List;
-class PushdownProjectThroughInnerOuterJoinTest implements
MemoPatternMatchSupported {
+class PushDownProjectThroughInnerOuterJoinTest implements
MemoPatternMatchSupported {
private final LogicalOlapScan scan1 =
PlanConstructor.newLogicalOlapScan(0, "t1", 0);
private final LogicalOlapScan scan2 =
PlanConstructor.newLogicalOlapScan(1, "t2", 0);
private final LogicalOlapScan scan3 =
PlanConstructor.newLogicalOlapScan(2, "t3", 0);
@@ -59,7 +59,7 @@ class PushdownProjectThroughInnerOuterJoinTest implements
MemoPatternMatchSuppor
.build();
PlanChecker.from(MemoTestUtils.createConnectContext(), plan)
-
.applyExploration(PushdownProjectThroughInnerOuterJoin.INSTANCE.buildRules())
+
.applyExploration(PushDownProjectThroughInnerOuterJoin.INSTANCE.buildRules())
.printlnOrigin()
.printlnExploration()
.matchesExploration(
@@ -90,7 +90,7 @@ class PushdownProjectThroughInnerOuterJoinTest implements
MemoPatternMatchSuppor
.build();
PlanChecker.from(MemoTestUtils.createConnectContext(), plan)
-
.applyExploration(PushdownProjectThroughInnerOuterJoin.INSTANCE.buildRules())
+
.applyExploration(PushDownProjectThroughInnerOuterJoin.INSTANCE.buildRules())
.printlnOrigin()
.printlnExploration()
.matchesExploration(
@@ -121,7 +121,7 @@ class PushdownProjectThroughInnerOuterJoinTest implements
MemoPatternMatchSuppor
.build();
PlanChecker.from(MemoTestUtils.createConnectContext(), plan)
-
.applyExploration(PushdownProjectThroughInnerOuterJoin.INSTANCE.buildRules())
+
.applyExploration(PushDownProjectThroughInnerOuterJoin.INSTANCE.buildRules())
.printlnOrigin()
.printlnExploration()
.matchesExploration(
@@ -158,7 +158,7 @@ class PushdownProjectThroughInnerOuterJoinTest implements
MemoPatternMatchSuppor
.build();
PlanChecker.from(MemoTestUtils.createConnectContext(), plan)
-
.applyExploration(PushdownProjectThroughInnerOuterJoin.INSTANCE.buildRules())
+
.applyExploration(PushDownProjectThroughInnerOuterJoin.INSTANCE.buildRules())
.checkMemo(memo -> Assertions.assertEquals(1,
memo.getRoot().getLogicalExpressions().size()));
}
}
diff --git
a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/exploration/join/PushdownProjectThroughSemiJoinTest.java
b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/exploration/join/PushDownProjectThroughSemiJoinTest.java
similarity index 96%
rename from
fe/fe-core/src/test/java/org/apache/doris/nereids/rules/exploration/join/PushdownProjectThroughSemiJoinTest.java
rename to
fe/fe-core/src/test/java/org/apache/doris/nereids/rules/exploration/join/PushDownProjectThroughSemiJoinTest.java
index 862580208e6..8c5a29f0d55 100644
---
a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/exploration/join/PushdownProjectThroughSemiJoinTest.java
+++
b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/exploration/join/PushDownProjectThroughSemiJoinTest.java
@@ -36,7 +36,7 @@ import org.junit.jupiter.api.Test;
import java.util.List;
-class PushdownProjectThroughSemiJoinTest implements MemoPatternMatchSupported {
+class PushDownProjectThroughSemiJoinTest implements MemoPatternMatchSupported {
private final LogicalOlapScan scan1 =
PlanConstructor.newLogicalOlapScan(0, "t1", 0);
private final LogicalOlapScan scan2 =
PlanConstructor.newLogicalOlapScan(1, "t2", 0);
private final LogicalOlapScan scan3 =
PlanConstructor.newLogicalOlapScan(2, "t3", 0);
@@ -56,7 +56,7 @@ class PushdownProjectThroughSemiJoinTest implements
MemoPatternMatchSupported {
.build();
PlanChecker.from(MemoTestUtils.createConnectContext(), plan)
-
.applyExploration(PushdownProjectThroughSemiJoin.INSTANCE.buildRules())
+
.applyExploration(PushDownProjectThroughSemiJoin.INSTANCE.buildRules())
.printlnOrigin()
.printlnExploration()
.matchesExploration(
@@ -87,7 +87,7 @@ class PushdownProjectThroughSemiJoinTest implements
MemoPatternMatchSupported {
.build();
PlanChecker.from(MemoTestUtils.createConnectContext(), plan)
-
.applyExploration(PushdownProjectThroughSemiJoin.INSTANCE.buildRules())
+
.applyExploration(PushDownProjectThroughSemiJoin.INSTANCE.buildRules())
.printlnOrigin()
.printlnExploration()
.matchesExploration(
@@ -117,7 +117,7 @@ class PushdownProjectThroughSemiJoinTest implements
MemoPatternMatchSupported {
.build();
PlanChecker.from(MemoTestUtils.createConnectContext(), plan)
-
.applyExploration(PushdownProjectThroughSemiJoin.INSTANCE.buildRules())
+
.applyExploration(PushDownProjectThroughSemiJoin.INSTANCE.buildRules())
.printlnOrigin()
.printlnExploration()
.matchesExploration(
diff --git
a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/AggScalarSubQueryToWindowFunctionTest.java
b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/AggScalarSubQueryToWindowFunctionTest.java
index bc33c4c70e7..d7dad886ac3 100644
---
a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/AggScalarSubQueryToWindowFunctionTest.java
+++
b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/AggScalarSubQueryToWindowFunctionTest.java
@@ -342,7 +342,7 @@ public class AggScalarSubQueryToWindowFunctionTest extends
TPCHTestBase implemen
Plan plan = PlanChecker.from(createCascadesContext(sql))
.analyze(sql)
.applyBottomUp(new PullUpProjectUnderApply())
- .applyTopDown(new PushdownFilterThroughProject())
+ .applyTopDown(new PushDownFilterThroughProject())
.customRewrite(new EliminateUnnecessaryProject())
.customRewrite(new AggScalarSubQueryToWindowFunction())
.rewrite()
diff --git
a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushdowFilterThroughProjectTest.java
b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushDowFilterThroughProjectTest.java
similarity index 93%
rename from
fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushdowFilterThroughProjectTest.java
rename to
fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushDowFilterThroughProjectTest.java
index 6118a98ebd9..ad922a8f1c5 100644
---
a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushdowFilterThroughProjectTest.java
+++
b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushDowFilterThroughProjectTest.java
@@ -38,7 +38,7 @@ import org.apache.doris.qe.ConnectContext;
import com.google.common.collect.ImmutableList;
import org.junit.jupiter.api.Test;
-class PushdowFilterThroughProjectTest implements MemoPatternMatchSupported {
+class PushDowFilterThroughProjectTest implements MemoPatternMatchSupported {
private final LogicalOlapScan scan = new
LogicalOlapScan(StatementScopeIdGenerator.newRelationId(),
PlanConstructor.student,
ImmutableList.of(""));
@@ -57,7 +57,7 @@ class PushdowFilterThroughProjectTest implements
MemoPatternMatchSupported {
.build();
PlanChecker.from(context, plan)
- .applyTopDown(new PushdownFilterThroughProject())
+ .applyTopDown(new PushDownFilterThroughProject())
.matches(logicalFilter().when(f ->
f.getPredicate().toSql().equals("id IS NULL")
));
@@ -77,7 +77,7 @@ class PushdowFilterThroughProjectTest implements
MemoPatternMatchSupported {
.build();
PlanChecker.from(context, plan)
- .applyTopDown(new PushdownFilterThroughProject())
+ .applyTopDown(new PushDownFilterThroughProject())
.matches(logicalFilter(logicalProject()));
// filter -> limit -> project(windows)
@@ -88,7 +88,7 @@ class PushdowFilterThroughProjectTest implements
MemoPatternMatchSupported {
.build();
PlanChecker.from(context, plan)
- .applyTopDown(new PushdownFilterThroughProject())
+ .applyTopDown(new PushDownFilterThroughProject())
.matches(logicalFilter(logicalLimit(logicalProject())));
}
@@ -104,7 +104,7 @@ class PushdowFilterThroughProjectTest implements
MemoPatternMatchSupported {
.build();
PlanChecker.from(context, plan)
- .applyTopDown(new PushdownFilterThroughProject())
+ .applyTopDown(new PushDownFilterThroughProject())
.matches(logicalProject(logicalFilter(logicalLimit()).when(f ->
f.getPredicate().toSql().equals("id IS NULL"))));
}
diff --git
a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushdownAliasThroughJoinTest.java
b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushDownAliasThroughJoinTest.java
similarity index 95%
rename from
fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushdownAliasThroughJoinTest.java
rename to
fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushDownAliasThroughJoinTest.java
index 543ff0933b5..e0e05716f1d 100644
---
a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushdownAliasThroughJoinTest.java
+++
b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushDownAliasThroughJoinTest.java
@@ -36,7 +36,7 @@ import org.junit.jupiter.api.Test;
import java.util.List;
-class PushdownAliasThroughJoinTest implements MemoPatternMatchSupported {
+class PushDownAliasThroughJoinTest implements MemoPatternMatchSupported {
private static final LogicalOlapScan scan1 =
PlanConstructor.newLogicalOlapScan(0, "t1", 0);
private static final LogicalOlapScan scan2 =
PlanConstructor.newLogicalOlapScan(1, "t2", 0);
@@ -49,7 +49,7 @@ class PushdownAliasThroughJoinTest implements
MemoPatternMatchSupported {
.build();
PlanChecker.from(MemoTestUtils.createConnectContext(), plan)
- .applyTopDown(new PushdownAliasThroughJoin())
+ .applyTopDown(new PushDownAliasThroughJoin())
.matches(
logicalProject(
logicalJoin(
@@ -69,7 +69,7 @@ class PushdownAliasThroughJoinTest implements
MemoPatternMatchSupported {
.build();
PlanChecker.from(MemoTestUtils.createConnectContext(), plan)
- .applyTopDown(new PushdownAliasThroughJoin())
+ .applyTopDown(new PushDownAliasThroughJoin())
.matches(
logicalProject(
logicalJoin(
@@ -94,7 +94,7 @@ class PushdownAliasThroughJoinTest implements
MemoPatternMatchSupported {
.build();
PlanChecker.from(MemoTestUtils.createConnectContext(), plan)
- .applyTopDown(new PushdownAliasThroughJoin())
+ .applyTopDown(new PushDownAliasThroughJoin())
.matches(
logicalProject(
logicalJoin(
@@ -116,7 +116,7 @@ class PushdownAliasThroughJoinTest implements
MemoPatternMatchSupported {
.join(scan2, JoinType.INNER_JOIN, Pair.of(0,
0)).projectExprs(projects).build();
PlanChecker.from(MemoTestUtils.createConnectContext(), plan)
- .applyTopDown(new PushdownAliasThroughJoin())
+ .applyTopDown(new PushDownAliasThroughJoin())
.matches(logicalProject(logicalJoin(logicalOlapScan(),
logicalOlapScan()))
.when(project ->
project.getProjects().get(0).toSql().equals("markSlot1")
&& project.getProjects().get(1).toSql()
diff --git
a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushdownCountThroughJoinTest.java
b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushDownCountThroughJoinTest.java
similarity index 89%
rename from
fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushdownCountThroughJoinTest.java
rename to
fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushDownCountThroughJoinTest.java
index 69b9ae77511..21eebe1b375 100644
---
a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushdownCountThroughJoinTest.java
+++
b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushDownCountThroughJoinTest.java
@@ -39,7 +39,7 @@ import org.junit.jupiter.api.Test;
import java.util.Set;
-class PushdownCountThroughJoinTest implements MemoPatternMatchSupported {
+class PushDownCountThroughJoinTest implements MemoPatternMatchSupported {
private static final LogicalOlapScan scan1 =
PlanConstructor.newLogicalOlapScan(0, "t1", 0);
private static final LogicalOlapScan scan2 =
PlanConstructor.newLogicalOlapScan(1, "t2", 0);
@@ -48,7 +48,7 @@ class PushdownCountThroughJoinTest implements
MemoPatternMatchSupported {
new MockUp<SessionVariable>() {
@Mock
public Set<Integer> getEnableNereidsRules() {
- return
ImmutableSet.of(RuleType.PUSHDOWN_COUNT_THROUGH_JOIN.type());
+ return
ImmutableSet.of(RuleType.PUSH_DOWN_COUNT_THROUGH_JOIN.type());
}
};
Alias count = new Count(scan1.getOutput().get(0)).alias("count");
@@ -58,7 +58,7 @@ class PushdownCountThroughJoinTest implements
MemoPatternMatchSupported {
.build();
PlanChecker.from(MemoTestUtils.createConnectContext(), plan)
- .applyTopDown(new PushdownCountThroughJoin())
+ .applyTopDown(new PushDownCountThroughJoin())
.matches(
logicalAggregate(
logicalJoin(
@@ -74,7 +74,7 @@ class PushdownCountThroughJoinTest implements
MemoPatternMatchSupported {
new MockUp<SessionVariable>() {
@Mock
public Set<Integer> getEnableNereidsRules() {
- return
ImmutableSet.of(RuleType.PUSHDOWN_COUNT_THROUGH_JOIN.type());
+ return
ImmutableSet.of(RuleType.PUSH_DOWN_COUNT_THROUGH_JOIN.type());
}
};
Alias leftCnt1 = new Count(scan1.getOutput().get(0)).alias("leftCnt1");
@@ -87,7 +87,7 @@ class PushdownCountThroughJoinTest implements
MemoPatternMatchSupported {
.build();
PlanChecker.from(MemoTestUtils.createConnectContext(), plan)
- .applyTopDown(new PushdownCountThroughJoin())
+ .applyTopDown(new PushDownCountThroughJoin())
.matches(
logicalAggregate(
logicalJoin(
@@ -103,7 +103,7 @@ class PushdownCountThroughJoinTest implements
MemoPatternMatchSupported {
new MockUp<SessionVariable>() {
@Mock
public Set<Integer> getEnableNereidsRules() {
- return
ImmutableSet.of(RuleType.PUSHDOWN_COUNT_THROUGH_JOIN.type());
+ return
ImmutableSet.of(RuleType.PUSH_DOWN_COUNT_THROUGH_JOIN.type());
}
};
Alias count = new Count().alias("countStar");
@@ -113,7 +113,7 @@ class PushdownCountThroughJoinTest implements
MemoPatternMatchSupported {
.build();
PlanChecker.from(MemoTestUtils.createConnectContext(), plan)
- .applyTopDown(new PushdownCountThroughJoin())
+ .applyTopDown(new PushDownCountThroughJoin())
.matches(
logicalAggregate(
logicalJoin(
@@ -129,7 +129,7 @@ class PushdownCountThroughJoinTest implements
MemoPatternMatchSupported {
new MockUp<SessionVariable>() {
@Mock
public Set<Integer> getEnableNereidsRules() {
- return
ImmutableSet.of(RuleType.PUSHDOWN_COUNT_THROUGH_JOIN.type());
+ return
ImmutableSet.of(RuleType.PUSH_DOWN_COUNT_THROUGH_JOIN.type());
}
};
Alias count = new Count().alias("countStar");
@@ -140,7 +140,7 @@ class PushdownCountThroughJoinTest implements
MemoPatternMatchSupported {
// shouldn't rewrite.
PlanChecker.from(MemoTestUtils.createConnectContext(), plan)
- .applyTopDown(new PushdownCountThroughJoin())
+ .applyTopDown(new PushDownCountThroughJoin())
.matches(
logicalAggregate(
logicalJoin(
@@ -156,7 +156,7 @@ class PushdownCountThroughJoinTest implements
MemoPatternMatchSupported {
new MockUp<SessionVariable>() {
@Mock
public Set<Integer> getEnableNereidsRules() {
- return
ImmutableSet.of(RuleType.PUSHDOWN_COUNT_THROUGH_JOIN.type());
+ return
ImmutableSet.of(RuleType.PUSH_DOWN_COUNT_THROUGH_JOIN.type());
}
};
Alias leftCnt = new Count(scan1.getOutput().get(0)).alias("leftCnt");
@@ -169,7 +169,7 @@ class PushdownCountThroughJoinTest implements
MemoPatternMatchSupported {
.build();
PlanChecker.from(MemoTestUtils.createConnectContext(), plan)
- .applyTopDown(new PushdownCountThroughJoin())
+ .applyTopDown(new PushDownCountThroughJoin())
.matches(
logicalAggregate(
logicalJoin(
diff --git
a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushdownDistinctThroughJoinTest.java
b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushDownDistinctThroughJoinTest.java
similarity index 91%
rename from
fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushdownDistinctThroughJoinTest.java
rename to
fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushDownDistinctThroughJoinTest.java
index feaeb5fa051..aac1bf2c7d4 100644
---
a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushdownDistinctThroughJoinTest.java
+++
b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushDownDistinctThroughJoinTest.java
@@ -37,7 +37,7 @@ import org.junit.jupiter.api.Test;
import java.util.Set;
-class PushdownDistinctThroughJoinTest implements MemoPatternMatchSupported {
+class PushDownDistinctThroughJoinTest implements MemoPatternMatchSupported {
private static final LogicalOlapScan scan1 =
PlanConstructor.newLogicalOlapScan(0, "t1", 0);
private static final LogicalOlapScan scan2 =
PlanConstructor.newLogicalOlapScan(1, "t2", 0);
private static final LogicalOlapScan scan3 =
PlanConstructor.newLogicalOlapScan(2, "t3", 0);
@@ -48,7 +48,7 @@ class PushdownDistinctThroughJoinTest implements
MemoPatternMatchSupported {
new MockUp<SessionVariable>() {
@Mock
public Set<Integer> getEnableNereidsRules() {
- return
ImmutableSet.of(RuleType.PUSHDOWN_DISTINCT_THROUGH_JOIN.type());
+ return
ImmutableSet.of(RuleType.PUSH_DOWN_DISTINCT_THROUGH_JOIN.type());
}
};
LogicalPlan plan = new LogicalPlanBuilder(scan1)
@@ -59,7 +59,7 @@ class PushdownDistinctThroughJoinTest implements
MemoPatternMatchSupported {
.build();
PlanChecker.from(MemoTestUtils.createConnectContext(), plan)
- .customRewrite(new PushdownDistinctThroughJoin())
+ .customRewrite(new PushDownDistinctThroughJoin())
.matches(
logicalAggregate(
logicalJoin(
@@ -76,7 +76,7 @@ class PushdownDistinctThroughJoinTest implements
MemoPatternMatchSupported {
new MockUp<SessionVariable>() {
@Mock
public Set<Integer> getEnableNereidsRules() {
- return
ImmutableSet.of(RuleType.PUSHDOWN_DISTINCT_THROUGH_JOIN.type());
+ return
ImmutableSet.of(RuleType.PUSH_DOWN_DISTINCT_THROUGH_JOIN.type());
}
};
LogicalPlan plan = new LogicalPlanBuilder(scan1)
@@ -89,7 +89,7 @@ class PushdownDistinctThroughJoinTest implements
MemoPatternMatchSupported {
.build();
PlanChecker.from(MemoTestUtils.createConnectContext(), plan)
- .customRewrite(new PushdownDistinctThroughJoin())
+ .customRewrite(new PushDownDistinctThroughJoin())
.matches(
logicalAggregate(
logicalJoin(
diff --git
a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushdownExpressionsInHashConditionTest.java
b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushDownExpressionsInHashConditionTest.java
similarity index 96%
rename from
fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushdownExpressionsInHashConditionTest.java
rename to
fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushDownExpressionsInHashConditionTest.java
index dfad75d5d80..ca1e48fc7eb 100644
---
a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushdownExpressionsInHashConditionTest.java
+++
b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushDownExpressionsInHashConditionTest.java
@@ -30,7 +30,7 @@ import org.junit.jupiter.api.Test;
import java.util.List;
-public class PushdownExpressionsInHashConditionTest extends TestWithFeService
implements MemoPatternMatchSupported {
+public class PushDownExpressionsInHashConditionTest extends TestWithFeService
implements MemoPatternMatchSupported {
@Override
protected void runBeforeAll() throws Exception {
createDatabase("test");
@@ -83,7 +83,7 @@ public class PushdownExpressionsInHashConditionTest extends
TestWithFeService im
PlanChecker.from(connectContext)
.analyze("SELECT * FROM T1 JOIN T2 ON T1.ID + 1 = T2.ID + 2
AND T1.ID + 1 > 2")
.applyTopDown(new FindHashConditionForJoin())
- .applyTopDown(new PushdownExpressionsInHashCondition())
+ .applyTopDown(new PushDownExpressionsInHashCondition())
.matches(
logicalProject(
logicalJoin(
@@ -104,7 +104,7 @@ public class PushdownExpressionsInHashConditionTest extends
TestWithFeService im
.analyze(
"SELECT * FROM (SELECT * FROM T1) X JOIN (SELECT *
FROM T2) Y ON X.ID + 1 = Y.ID + 2 AND X.ID + 1 > 2")
.applyTopDown(new FindHashConditionForJoin())
- .applyTopDown(new PushdownExpressionsInHashCondition())
+ .applyTopDown(new PushDownExpressionsInHashCondition())
.matches(
logicalProject(
logicalJoin(
@@ -133,7 +133,7 @@ public class PushdownExpressionsInHashConditionTest extends
TestWithFeService im
.analyze(
"SELECT * FROM T1 JOIN (SELECT ID, SUM(SCORE) SCORE
FROM T2 GROUP BY ID) T ON T1.ID + 1 = T.ID AND T.SCORE = T1.SCORE + 10")
.applyTopDown(new FindHashConditionForJoin())
- .applyTopDown(new PushdownExpressionsInHashCondition())
+ .applyTopDown(new PushDownExpressionsInHashCondition())
.matches(
logicalProject(
logicalJoin(
@@ -160,7 +160,7 @@ public class PushdownExpressionsInHashConditionTest extends
TestWithFeService im
.analyze(
"SELECT * FROM T1 JOIN (SELECT ID, SUM(SCORE) SCORE
FROM T2 GROUP BY ID ORDER BY ID) T ON T1.ID + 1 = T.ID AND T.SCORE = T1.SCORE +
10")
.applyTopDown(new FindHashConditionForJoin())
- .applyTopDown(new PushdownExpressionsInHashCondition())
+ .applyTopDown(new PushDownExpressionsInHashCondition())
.matches(
logicalProject(
logicalJoin(
diff --git
a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushdownFilterThroughAggregationTest.java
b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushDownFilterThroughAggregationTest.java
similarity index 96%
rename from
fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushdownFilterThroughAggregationTest.java
rename to
fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushDownFilterThroughAggregationTest.java
index 80f70f280d9..830921b9a2b 100644
---
a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushdownFilterThroughAggregationTest.java
+++
b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushDownFilterThroughAggregationTest.java
@@ -44,7 +44,7 @@ import org.junit.jupiter.api.Test;
import java.util.Optional;
-public class PushdownFilterThroughAggregationTest implements
MemoPatternMatchSupported {
+public class PushDownFilterThroughAggregationTest implements
MemoPatternMatchSupported {
private final LogicalOlapScan scan = new
LogicalOlapScan(StatementScopeIdGenerator.newRelationId(),
PlanConstructor.student,
ImmutableList.of(""));
@@ -79,7 +79,7 @@ public class PushdownFilterThroughAggregationTest implements
MemoPatternMatchSup
.build();
PlanChecker.from(MemoTestUtils.createConnectContext(), plan)
- .applyTopDown(new PushdownFilterThroughAggregation())
+ .applyTopDown(new PushDownFilterThroughAggregation())
.matches(
logicalProject(
logicalAggregate(
@@ -132,7 +132,7 @@ public class PushdownFilterThroughAggregationTest
implements MemoPatternMatchSup
.build();
PlanChecker.from(MemoTestUtils.createConnectContext(), plan)
- .applyTopDown(new PushdownFilterThroughAggregation())
+ .applyTopDown(new PushDownFilterThroughAggregation())
.printlnTree()
.matches(
logicalProject(
@@ -167,7 +167,7 @@ public class PushdownFilterThroughAggregationTest
implements MemoPatternMatchSup
.build();
PlanChecker.from(MemoTestUtils.createConnectContext(), plan)
- .applyTopDown(new PushdownFilterThroughAggregation())
+ .applyTopDown(new PushDownFilterThroughAggregation())
.printlnTree()
.matches(
logicalProject(
@@ -190,7 +190,7 @@ public class PushdownFilterThroughAggregationTest
implements MemoPatternMatchSup
.build();
PlanChecker.from(MemoTestUtils.createConnectContext(), plan)
- .applyTopDown(new PushdownFilterThroughAggregation())
+ .applyTopDown(new PushDownFilterThroughAggregation())
.printlnTree()
.matches(
logicalProject(
diff --git
a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushdownFilterThroughJoinTest.java
b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushDownFilterThroughJoinTest.java
similarity index 95%
rename from
fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushdownFilterThroughJoinTest.java
rename to
fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushDownFilterThroughJoinTest.java
index 559f9d92ce1..343619cbd8b 100644
---
a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushdownFilterThroughJoinTest.java
+++
b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushDownFilterThroughJoinTest.java
@@ -44,7 +44,7 @@ import java.util.Set;
* PushdownFilterThroughJoinTest UT.
*/
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
-public class PushdownFilterThroughJoinTest implements
MemoPatternMatchSupported {
+public class PushDownFilterThroughJoinTest implements
MemoPatternMatchSupported {
private LogicalPlan rStudent;
private LogicalPlan rScore;
@@ -82,7 +82,7 @@ public class PushdownFilterThroughJoinTest implements
MemoPatternMatchSupported
.build();
PlanChecker.from(MemoTestUtils.createConnectContext(), plan)
- .applyTopDown(PushdownFilterThroughJoin.INSTANCE)
+ .applyTopDown(PushDownFilterThroughJoin.INSTANCE)
.matchesFromRoot(
logicalJoin(
logicalFilter(logicalOlapScan())
@@ -103,7 +103,7 @@ public class PushdownFilterThroughJoinTest implements
MemoPatternMatchSupported
.build();
PlanChecker.from(MemoTestUtils.createConnectContext(), plan)
- .applyTopDown(PushdownFilterThroughJoin.INSTANCE)
+ .applyTopDown(PushDownFilterThroughJoin.INSTANCE)
.matchesFromRoot(
logicalJoin(
logicalOlapScan(),
@@ -134,7 +134,7 @@ public class PushdownFilterThroughJoinTest implements
MemoPatternMatchSupported
if (joinType.isInnerJoin()) {
PlanChecker.from(MemoTestUtils.createConnectContext(), plan)
- .applyTopDown(PushdownFilterThroughJoin.INSTANCE)
+ .applyTopDown(PushDownFilterThroughJoin.INSTANCE)
.printlnTree()
.matchesFromRoot(
logicalJoin(
@@ -147,7 +147,7 @@ public class PushdownFilterThroughJoinTest implements
MemoPatternMatchSupported
}
if (joinType.isCrossJoin()) {
PlanChecker.from(MemoTestUtils.createConnectContext(), plan)
- .applyTopDown(PushdownFilterThroughJoin.INSTANCE)
+ .applyTopDown(PushDownFilterThroughJoin.INSTANCE)
.printlnTree()
.matchesFromRoot(
logicalFilter(
@@ -183,7 +183,7 @@ public class PushdownFilterThroughJoinTest implements
MemoPatternMatchSupported
.build();
PlanChecker.from(MemoTestUtils.createConnectContext(), plan)
- .applyTopDown(PushdownFilterThroughJoin.INSTANCE)
+ .applyTopDown(PushDownFilterThroughJoin.INSTANCE)
.matchesFromRoot(
logicalFilter(
logicalJoin(
@@ -206,7 +206,7 @@ public class PushdownFilterThroughJoinTest implements
MemoPatternMatchSupported
.build();
PlanChecker.from(MemoTestUtils.createConnectContext(), plan)
- .applyTopDown(PushdownFilterThroughJoin.INSTANCE)
+ .applyTopDown(PushDownFilterThroughJoin.INSTANCE)
.matchesFromRoot(
logicalFilter(
logicalJoin(
diff --git
a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushdownFilterThroughSortTest.java
b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushDownFilterThroughSortTest.java
similarity index 93%
rename from
fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushdownFilterThroughSortTest.java
rename to
fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushDownFilterThroughSortTest.java
index 4677514c921..9f898d1cca2 100644
---
a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushdownFilterThroughSortTest.java
+++
b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushDownFilterThroughSortTest.java
@@ -40,7 +40,7 @@ import org.junit.jupiter.api.Test;
import java.util.List;
import java.util.stream.Collectors;
-public class PushdownFilterThroughSortTest implements
MemoPatternMatchSupported {
+public class PushDownFilterThroughSortTest implements
MemoPatternMatchSupported {
private final LogicalOlapScan scan = new
LogicalOlapScan(StatementScopeIdGenerator.newRelationId(),
PlanConstructor.student,
ImmutableList.of(""));
@@ -56,7 +56,7 @@ public class PushdownFilterThroughSortTest implements
MemoPatternMatchSupported
.build();
PlanChecker.from(MemoTestUtils.createConnectContext(), plan)
- .applyTopDown(new PushdownFilterThroughSort())
+ .applyTopDown(new PushDownFilterThroughSort())
.matchesFromRoot(
logicalSort(
logicalFilter(
@@ -77,7 +77,7 @@ public class PushdownFilterThroughSortTest implements
MemoPatternMatchSupported
.build();
PlanChecker.from(MemoTestUtils.createConnectContext(), plan)
- .applyTopDown(new PushdownFilterThroughSort())
+ .applyTopDown(new PushDownFilterThroughSort())
.matchesFromRoot(logicalFilter(logicalOlapScan()));
}
@@ -95,7 +95,7 @@ public class PushdownFilterThroughSortTest implements
MemoPatternMatchSupported
.filter(filterPredicate)
.build();
PlanChecker.from(MemoTestUtils.createConnectContext(), plan)
- .applyTopDown(new PushdownFilterThroughSort())
+ .applyTopDown(new PushDownFilterThroughSort())
.matchesFromRoot(logicalSort(logicalFilter(logicalOlapScan())));
Expression filterPredicate2 = new EqualTo(id, Literal.of(1));
@@ -104,7 +104,7 @@ public class PushdownFilterThroughSortTest implements
MemoPatternMatchSupported
.filter(Sets.newHashSet(filterPredicate2, filterPredicate))
.build();
PlanChecker.from(MemoTestUtils.createConnectContext(), plan)
- .applyTopDown(new PushdownFilterThroughSort())
+ .applyTopDown(new PushDownFilterThroughSort())
.matchesFromRoot(logicalFilter(logicalOlapScan()));
}
}
diff --git
a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushdownFilterThroughWindowTest.java
b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushDownFilterThroughWindowTest.java
similarity index 97%
rename from
fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushdownFilterThroughWindowTest.java
rename to
fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushDownFilterThroughWindowTest.java
index 8d09426ce35..e62de6cdf9e 100644
---
a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushdownFilterThroughWindowTest.java
+++
b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushDownFilterThroughWindowTest.java
@@ -42,7 +42,7 @@ import org.junit.jupiter.api.Test;
import java.util.List;
-class PushdownFilterThroughWindowTest implements MemoPatternMatchSupported {
+class PushDownFilterThroughWindowTest implements MemoPatternMatchSupported {
private final LogicalOlapScan scan = new
LogicalOlapScan(StatementScopeIdGenerator.newRelationId(),
PlanConstructor.student,
ImmutableList.of(""));
@@ -67,7 +67,7 @@ class PushdownFilterThroughWindowTest implements
MemoPatternMatchSupported {
.project(ImmutableList.of(0))
.build();
PlanChecker.from(context, plan)
- .applyTopDown(new PushdownFilterThroughWindow())
+ .applyTopDown(new PushDownFilterThroughWindow())
.matches(
logicalProject(
logicalWindow(
diff --git
a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushdownJoinOtherConditionTest.java
b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushDownJoinOtherConditionTest.java
similarity index 96%
rename from
fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushdownJoinOtherConditionTest.java
rename to
fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushDownJoinOtherConditionTest.java
index 98c0f283946..05642f084d5 100644
---
a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushdownJoinOtherConditionTest.java
+++
b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushDownJoinOtherConditionTest.java
@@ -41,7 +41,7 @@ import org.junit.jupiter.api.TestInstance;
import java.util.List;
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
-class PushdownJoinOtherConditionTest implements MemoPatternMatchSupported {
+class PushDownJoinOtherConditionTest implements MemoPatternMatchSupported {
private LogicalOlapScan rStudent;
private LogicalOlapScan rScore;
@@ -92,7 +92,7 @@ class PushdownJoinOtherConditionTest implements
MemoPatternMatchSupported {
.build();
PlanChecker planChecker =
PlanChecker.from(MemoTestUtils.createConnectContext(), root)
- .applyTopDown(new PushdownJoinOtherCondition());
+ .applyTopDown(new PushDownJoinOtherCondition());
if (testRight) {
planChecker.matches(
@@ -130,7 +130,7 @@ class PushdownJoinOtherConditionTest implements
MemoPatternMatchSupported {
.build();
PlanChecker.from(MemoTestUtils.createConnectContext(), root)
- .applyTopDown(new PushdownJoinOtherCondition())
+ .applyTopDown(new PushDownJoinOtherCondition())
.matches(
logicalJoin(
logicalFilter().when(left ->
left.getConjuncts().equals(ImmutableSet.of(leftSide))),
@@ -164,7 +164,7 @@ class PushdownJoinOtherConditionTest implements
MemoPatternMatchSupported {
.build();
PlanChecker planChecker =
PlanChecker.from(MemoTestUtils.createConnectContext(), root)
- .applyTopDown(new PushdownJoinOtherCondition());
+ .applyTopDown(new PushDownJoinOtherCondition());
if (testRight) {
planChecker.matches(
diff --git
a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushdownLimitDistinctThroughJoinTest.java
b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushDownLimitDistinctThroughJoinTest.java
similarity index 93%
rename from
fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushdownLimitDistinctThroughJoinTest.java
rename to
fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushDownLimitDistinctThroughJoinTest.java
index 73a9baac8e4..e3c972e0556 100644
---
a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushdownLimitDistinctThroughJoinTest.java
+++
b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushDownLimitDistinctThroughJoinTest.java
@@ -30,7 +30,7 @@ import org.apache.doris.utframe.TestWithFeService;
import com.google.common.collect.ImmutableList;
import org.junit.jupiter.api.Test;
-class PushdownLimitDistinctThroughJoinTest extends TestWithFeService
implements MemoPatternMatchSupported {
+class PushDownLimitDistinctThroughJoinTest extends TestWithFeService
implements MemoPatternMatchSupported {
private static final LogicalOlapScan scan1 =
PlanConstructor.newLogicalOlapScan(0, "t1", 0);
private static final LogicalOlapScan scan2 =
PlanConstructor.newLogicalOlapScan(1, "t2", 0);
@@ -75,7 +75,7 @@ class PushdownLimitDistinctThroughJoinTest extends
TestWithFeService implements
.limit(10)
.build();
PlanChecker.from(connectContext, plan)
- .applyTopDown(new PushdownLimitDistinctThroughJoin())
+ .applyTopDown(new PushDownLimitDistinctThroughJoin())
.matches(
logicalJoin(
logicalLimit(logicalAggregate(logicalOlapScan())).when(l -> l.getLimit() == 10),
@@ -89,7 +89,7 @@ class PushdownLimitDistinctThroughJoinTest extends
TestWithFeService implements
.limit(10)
.build();
PlanChecker.from(connectContext, plan)
- .applyTopDown(new PushdownLimitDistinctThroughJoin())
+ .applyTopDown(new PushDownLimitDistinctThroughJoin())
.matches(
logicalJoin(
logicalOlapScan(),
@@ -103,7 +103,7 @@ class PushdownLimitDistinctThroughJoinTest extends
TestWithFeService implements
.limit(10)
.build();
PlanChecker.from(connectContext, plan)
- .applyTopDown(new PushdownLimitDistinctThroughJoin())
+ .applyTopDown(new PushDownLimitDistinctThroughJoin())
.matches(
logicalJoin(
logicalLimit(logicalAggregate(logicalOlapScan())).when(l -> l.getLimit() == 10),
@@ -117,7 +117,7 @@ class PushdownLimitDistinctThroughJoinTest extends
TestWithFeService implements
.limit(10)
.build();
PlanChecker.from(connectContext, plan)
- .applyTopDown(new PushdownLimitDistinctThroughJoin())
+ .applyTopDown(new PushDownLimitDistinctThroughJoin())
.matches(
logicalJoin(
logicalOlapScan(),
@@ -148,7 +148,7 @@ class PushdownLimitDistinctThroughJoinTest extends
TestWithFeService implements
.limit(10)
.build();
PlanChecker.from(connectContext, plan)
- .applyTopDown(new PushdownLimitDistinctThroughJoin())
+ .applyTopDown(new PushDownLimitDistinctThroughJoin())
.matches(logicalJoin(logicalOlapScan(), logicalOlapScan()));
}
@@ -161,7 +161,7 @@ class PushdownLimitDistinctThroughJoinTest extends
TestWithFeService implements
.limit(10)
.build();
PlanChecker.from(connectContext, plan)
- .applyTopDown(new PushdownLimitDistinctThroughJoin())
+ .applyTopDown(new PushDownLimitDistinctThroughJoin())
.matches(logicalJoin(logicalOlapScan(), logicalOlapScan()));
}
}
diff --git
a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushdownLimitTest.java
b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushDownLimitTest.java
similarity index 99%
rename from
fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushdownLimitTest.java
rename to
fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushDownLimitTest.java
index 28e1a7fa468..9ac6078a077 100644
---
a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushdownLimitTest.java
+++
b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushDownLimitTest.java
@@ -63,7 +63,7 @@ import java.util.Set;
import java.util.function.Function;
import java.util.stream.Collectors;
-class PushdownLimitTest extends TestWithFeService implements
MemoPatternMatchSupported {
+class PushDownLimitTest extends TestWithFeService implements
MemoPatternMatchSupported {
private final LogicalOlapScan scanScore = new
LogicalOlapScan(StatementScopeIdGenerator.newRelationId(),
PlanConstructor.score);
private final LogicalOlapScan scanStudent = new
LogicalOlapScan(StatementScopeIdGenerator.newRelationId(),
PlanConstructor.student);
@@ -351,7 +351,7 @@ class PushdownLimitTest extends TestWithFeService
implements MemoPatternMatchSup
PlanChecker.from(MemoTestUtils.createConnectContext())
.analyze(plan)
.applyTopDown(new ConvertInnerOrCrossJoin())
- .applyTopDown(new PushdownLimit())
+ .applyTopDown(new PushDownLimit())
.matchesFromRoot(pattern);
}
diff --git
a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushdownMinMaxThroughJoinTest.java
b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushDownMinMaxThroughJoinTest.java
similarity index 91%
rename from
fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushdownMinMaxThroughJoinTest.java
rename to
fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushDownMinMaxThroughJoinTest.java
index 8c19c0c38c2..dafef59100a 100644
---
a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushdownMinMaxThroughJoinTest.java
+++
b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushDownMinMaxThroughJoinTest.java
@@ -40,7 +40,7 @@ import org.junit.jupiter.api.Test;
import java.util.Set;
-class PushdownMinMaxThroughJoinTest implements MemoPatternMatchSupported {
+class PushDownMinMaxThroughJoinTest implements MemoPatternMatchSupported {
private static final LogicalOlapScan scan1 =
PlanConstructor.newLogicalOlapScan(0, "t1", 0);
private static final LogicalOlapScan scan2 =
PlanConstructor.newLogicalOlapScan(1, "t2", 0);
private static final LogicalOlapScan scan3 =
PlanConstructor.newLogicalOlapScan(2, "t3", 0);
@@ -51,7 +51,7 @@ class PushdownMinMaxThroughJoinTest implements
MemoPatternMatchSupported {
new MockUp<SessionVariable>() {
@Mock
public Set<Integer> getEnableNereidsRules() {
- return
ImmutableSet.of(RuleType.PUSHDOWN_MIN_MAX_THROUGH_JOIN.type());
+ return
ImmutableSet.of(RuleType.PUSH_DOWN_MIN_MAX_THROUGH_JOIN.type());
}
};
Alias min = new Min(scan1.getOutput().get(0)).alias("min");
@@ -61,7 +61,7 @@ class PushdownMinMaxThroughJoinTest implements
MemoPatternMatchSupported {
.build();
PlanChecker.from(MemoTestUtils.createConnectContext(), plan)
- .applyTopDown(new PushdownMinMaxThroughJoin())
+ .applyTopDown(new PushDownMinMaxThroughJoin())
.matches(
logicalAggregate(
logicalJoin(
@@ -77,7 +77,7 @@ class PushdownMinMaxThroughJoinTest implements
MemoPatternMatchSupported {
new MockUp<SessionVariable>() {
@Mock
public Set<Integer> getEnableNereidsRules() {
- return
ImmutableSet.of(RuleType.PUSHDOWN_MIN_MAX_THROUGH_JOIN.type());
+ return
ImmutableSet.of(RuleType.PUSH_DOWN_MIN_MAX_THROUGH_JOIN.type());
}
};
Alias min = new Min(scan1.getOutput().get(0)).alias("min");
@@ -89,7 +89,7 @@ class PushdownMinMaxThroughJoinTest implements
MemoPatternMatchSupported {
.build();
PlanChecker.from(MemoTestUtils.createConnectContext(), plan)
- .applyTopDown(new PushdownMinMaxThroughJoin())
+ .applyTopDown(new PushDownMinMaxThroughJoin())
.printlnTree()
.matches(
logicalAggregate(
@@ -116,7 +116,7 @@ class PushdownMinMaxThroughJoinTest implements
MemoPatternMatchSupported {
new MockUp<SessionVariable>() {
@Mock
public Set<Integer> getEnableNereidsRules() {
- return
ImmutableSet.of(RuleType.PUSHDOWN_MIN_MAX_THROUGH_JOIN.type());
+ return
ImmutableSet.of(RuleType.PUSH_DOWN_MIN_MAX_THROUGH_JOIN.type());
}
};
// agg don't output group by
@@ -128,7 +128,7 @@ class PushdownMinMaxThroughJoinTest implements
MemoPatternMatchSupported {
.build();
PlanChecker.from(MemoTestUtils.createConnectContext(), plan)
- .applyTopDown(new PushdownMinMaxThroughJoin())
+ .applyTopDown(new PushDownMinMaxThroughJoin())
.matches(
logicalAggregate(
logicalJoin(
@@ -149,7 +149,7 @@ class PushdownMinMaxThroughJoinTest implements
MemoPatternMatchSupported {
new MockUp<SessionVariable>() {
@Mock
public Set<Integer> getEnableNereidsRules() {
- return
ImmutableSet.of(RuleType.PUSHDOWN_MIN_MAX_THROUGH_JOIN.type());
+ return
ImmutableSet.of(RuleType.PUSH_DOWN_MIN_MAX_THROUGH_JOIN.type());
}
};
Alias min = new Min(scan1.getOutput().get(1)).alias("min");
@@ -161,7 +161,7 @@ class PushdownMinMaxThroughJoinTest implements
MemoPatternMatchSupported {
PlanChecker.from(MemoTestUtils.createConnectContext(), plan)
.printlnTree()
- .applyTopDown(new PushdownMinMaxThroughJoin())
+ .applyTopDown(new PushDownMinMaxThroughJoin())
.matches(
logicalAggregate(
logicalJoin(
@@ -177,7 +177,7 @@ class PushdownMinMaxThroughJoinTest implements
MemoPatternMatchSupported {
new MockUp<SessionVariable>() {
@Mock
public Set<Integer> getEnableNereidsRules() {
- return
ImmutableSet.of(RuleType.PUSHDOWN_MIN_MAX_THROUGH_JOIN.type());
+ return
ImmutableSet.of(RuleType.PUSH_DOWN_MIN_MAX_THROUGH_JOIN.type());
}
};
Alias min = new Min(scan1.getOutput().get(1)).alias("min");
@@ -189,7 +189,7 @@ class PushdownMinMaxThroughJoinTest implements
MemoPatternMatchSupported {
.build();
PlanChecker.from(MemoTestUtils.createConnectContext(), plan)
- .applyTopDown(new PushdownMinMaxThroughJoin())
+ .applyTopDown(new PushDownMinMaxThroughJoin())
.matches(
logicalAggregate(
logicalJoin(
diff --git
a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushdownProjectThroughLimitTest.java
b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushDownProjectThroughLimitTest.java
similarity index 93%
rename from
fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushdownProjectThroughLimitTest.java
rename to
fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushDownProjectThroughLimitTest.java
index d3adbe98329..72b21e5e309 100644
---
a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushdownProjectThroughLimitTest.java
+++
b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushDownProjectThroughLimitTest.java
@@ -27,7 +27,7 @@ import org.apache.doris.nereids.util.PlanConstructor;
import com.google.common.collect.ImmutableList;
import org.junit.jupiter.api.Test;
-class PushdownProjectThroughLimitTest implements MemoPatternMatchSupported {
+class PushDownProjectThroughLimitTest implements MemoPatternMatchSupported {
@Test
void testPushdownProjectThroughLimit() {
@@ -37,7 +37,7 @@ class PushdownProjectThroughLimitTest implements
MemoPatternMatchSupported {
.build();
PlanChecker.from(MemoTestUtils.createConnectContext(), project)
- .applyTopDown(new PushdownProjectThroughLimit())
+ .applyTopDown(new PushDownProjectThroughLimit())
.matches(
logicalLimit(logicalProject())
);
diff --git
a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushdownSumThroughJoinTest.java
b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushDownSumThroughJoinTest.java
similarity index 90%
rename from
fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushdownSumThroughJoinTest.java
rename to
fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushDownSumThroughJoinTest.java
index f97c8244653..5828d2319f2 100644
---
a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushdownSumThroughJoinTest.java
+++
b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushDownSumThroughJoinTest.java
@@ -39,7 +39,7 @@ import org.junit.jupiter.api.Test;
import java.util.Set;
-class PushdownSumThroughJoinTest implements MemoPatternMatchSupported {
+class PushDownSumThroughJoinTest implements MemoPatternMatchSupported {
private static final LogicalOlapScan scan1 =
PlanConstructor.newLogicalOlapScan(0, "t1", 0);
private static final LogicalOlapScan scan2 =
PlanConstructor.newLogicalOlapScan(1, "t2", 0);
@@ -48,7 +48,7 @@ class PushdownSumThroughJoinTest implements
MemoPatternMatchSupported {
new MockUp<SessionVariable>() {
@Mock
public Set<Integer> getEnableNereidsRules() {
- return
ImmutableSet.of(RuleType.PUSHDOWN_SUM_THROUGH_JOIN.type());
+ return
ImmutableSet.of(RuleType.PUSH_DOWN_SUM_THROUGH_JOIN.type());
}
};
Alias sum = new Sum(scan1.getOutput().get(1)).alias("sum");
@@ -58,7 +58,7 @@ class PushdownSumThroughJoinTest implements
MemoPatternMatchSupported {
.build();
PlanChecker.from(MemoTestUtils.createConnectContext(), plan)
- .applyTopDown(new PushdownSumThroughJoin())
+ .applyTopDown(new PushDownSumThroughJoin())
.matches(
logicalAggregate(
logicalJoin(
@@ -74,7 +74,7 @@ class PushdownSumThroughJoinTest implements
MemoPatternMatchSupported {
new MockUp<SessionVariable>() {
@Mock
public Set<Integer> getEnableNereidsRules() {
- return
ImmutableSet.of(RuleType.PUSHDOWN_SUM_THROUGH_JOIN.type());
+ return
ImmutableSet.of(RuleType.PUSH_DOWN_SUM_THROUGH_JOIN.type());
}
};
Alias sum = new Sum(scan2.getOutput().get(1)).alias("sum");
@@ -84,7 +84,7 @@ class PushdownSumThroughJoinTest implements
MemoPatternMatchSupported {
.build();
PlanChecker.from(MemoTestUtils.createConnectContext(), plan)
- .applyTopDown(new PushdownSumThroughJoin())
+ .applyTopDown(new PushDownSumThroughJoin())
.matches(
logicalAggregate(
logicalJoin(
@@ -100,7 +100,7 @@ class PushdownSumThroughJoinTest implements
MemoPatternMatchSupported {
new MockUp<SessionVariable>() {
@Mock
public Set<Integer> getEnableNereidsRules() {
- return
ImmutableSet.of(RuleType.PUSHDOWN_SUM_THROUGH_JOIN.type());
+ return
ImmutableSet.of(RuleType.PUSH_DOWN_SUM_THROUGH_JOIN.type());
}
};
// agg don't output group by
@@ -111,7 +111,7 @@ class PushdownSumThroughJoinTest implements
MemoPatternMatchSupported {
.build();
PlanChecker.from(MemoTestUtils.createConnectContext(), plan)
- .applyTopDown(new PushdownSumThroughJoin())
+ .applyTopDown(new PushDownSumThroughJoin())
.matches(
logicalAggregate(
logicalJoin(
diff --git
a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushdownTopNThroughJoinTest.java
b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushDownTopNThroughJoinTest.java
similarity index 96%
rename from
fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushdownTopNThroughJoinTest.java
rename to
fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushDownTopNThroughJoinTest.java
index 8532f119298..7e8a82c31e4 100644
---
a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushdownTopNThroughJoinTest.java
+++
b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushDownTopNThroughJoinTest.java
@@ -36,7 +36,7 @@ import org.junit.jupiter.api.Test;
import java.util.List;
-class PushdownTopNThroughJoinTest extends TestWithFeService implements
MemoPatternMatchSupported {
+class PushDownTopNThroughJoinTest extends TestWithFeService implements
MemoPatternMatchSupported {
private static final LogicalOlapScan scan1 =
PlanConstructor.newLogicalOlapScan(0, "t1", 0);
private static final LogicalOlapScan scan2 =
PlanConstructor.newLogicalOlapScan(1, "t2", 0);
@@ -80,7 +80,7 @@ class PushdownTopNThroughJoinTest extends TestWithFeService
implements MemoPatte
.topN(10, 0, ImmutableList.of(0))
.build();
PlanChecker.from(connectContext, plan)
- .applyTopDown(new PushdownTopNThroughJoin())
+ .applyTopDown(new PushDownTopNThroughJoin())
.matches(
logicalTopN(
logicalJoin(
@@ -101,7 +101,7 @@ class PushdownTopNThroughJoinTest extends TestWithFeService
implements MemoPatte
.topN(10, 0, ImmutableList.of(0))
.build();
PlanChecker.from(connectContext, plan)
- .applyTopDown(new PushdownTopNThroughJoin())
+ .applyTopDown(new PushDownTopNThroughJoin())
.matches(
logicalTopN(
logicalProject(
@@ -186,7 +186,7 @@ class PushdownTopNThroughJoinTest extends TestWithFeService
implements MemoPatte
.topN(10, 0, ImmutableList.of(0))
.build();
PlanChecker.from(connectContext, plan)
- .applyTopDown(new PushdownTopNThroughJoin())
+ .applyTopDown(new PushDownTopNThroughJoin())
.matches(
logicalJoin(
logicalOlapScan(),
@@ -202,7 +202,7 @@ class PushdownTopNThroughJoinTest extends TestWithFeService
implements MemoPatte
.topN(10, 0, ImmutableList.of(0))
.build();
PlanChecker.from(connectContext, plan)
- .applyTopDown(new PushdownTopNThroughJoin())
+ .applyTopDown(new PushDownTopNThroughJoin())
.matches(
logicalJoin(
logicalOlapScan(),
diff --git
a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/mv/SelectRollupIndexTest.java
b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/mv/SelectRollupIndexTest.java
index ed5a96933db..4661fcf6943 100644
---
a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/mv/SelectRollupIndexTest.java
+++
b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/mv/SelectRollupIndexTest.java
@@ -20,7 +20,7 @@ package org.apache.doris.nereids.rules.rewrite.mv;
import org.apache.doris.common.FeConstants;
import
org.apache.doris.nereids.rules.analysis.LogicalSubQueryAliasToLogicalProject;
import org.apache.doris.nereids.rules.rewrite.MergeProjects;
-import org.apache.doris.nereids.rules.rewrite.PushdownFilterThroughProject;
+import org.apache.doris.nereids.rules.rewrite.PushDownFilterThroughProject;
import org.apache.doris.nereids.trees.plans.PreAggStatus;
import org.apache.doris.nereids.util.MemoPatternMatchSupported;
import org.apache.doris.nereids.util.PlanChecker;
@@ -189,7 +189,7 @@ class SelectRollupIndexTest extends
BaseMaterializedIndexSelectTest implements M
PlanChecker.from(connectContext)
.analyze(sql)
.applyBottomUp(new LogicalSubQueryAliasToLogicalProject())
- .applyTopDown(new PushdownFilterThroughProject())
+ .applyTopDown(new PushDownFilterThroughProject())
.applyBottomUp(new MergeProjects())
.applyTopDown(new SelectMaterializedIndexWithAggregate())
.applyTopDown(new SelectMaterializedIndexWithoutAggregate())
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]