You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "Baike Xia (Code Review)" <ge...@cloudera.org> on 2023/02/17 09:52:24 UTC

[Impala-ASF-CR] IMPALA-10861: Optimize the plan for identical predicates

Baike Xia has uploaded this change for review. ( http://gerrit.cloudera.org:8080/19511


Change subject: IMPALA-10861: Optimize the plan for identical predicates
......................................................................

IMPALA-10861: Optimize the plan for identical predicates

For hes query with two same predicates, duplicate data is deleted.

For example:
select * from a join b on a.id = b.id and a.id and b.id
where a.num > b.num and a.num > b.num
To:
select * from a join b on a.id = b.id where a.num > b.num

Testing:
 - Add fe tests

Change-Id: Ia249c8146215fad602e9310bf922c6bfa050b96b
---
M fe/src/main/java/org/apache/impala/planner/SingleNodePlanner.java
M testdata/workloads/functional-planner/queries/PlannerTest/join-order.test
M testdata/workloads/functional-planner/queries/PlannerTest/joins.test
3 files changed, 34 insertions(+), 6 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/11/19511/1
-- 
To view, visit http://gerrit.cloudera.org:8080/19511
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia249c8146215fad602e9310bf922c6bfa050b96b
Gerrit-Change-Number: 19511
Gerrit-PatchSet: 1
Gerrit-Owner: Baike Xia <xi...@163.com>

[Impala-ASF-CR] IMPALA-10861: Optimize the plan for identical predicates

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/19511 )

Change subject: IMPALA-10861: Optimize the plan for identical predicates
......................................................................


Patch Set 3:

Build failed: https://jenkins.impala.io/job/gerrit-verify-dryrun/9159/


-- 
To view, visit http://gerrit.cloudera.org:8080/19511
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia249c8146215fad602e9310bf922c6bfa050b96b
Gerrit-Change-Number: 19511
Gerrit-PatchSet: 3
Gerrit-Owner: Baike Xia <xi...@163.com>
Gerrit-Reviewer: Baike Xia <xi...@163.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Yida Wu <wy...@gmail.com>
Gerrit-Comment-Date: Tue, 21 Mar 2023 07:08:59 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-10861: Optimize the plan for identical predicates

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/19511 )

Change subject: IMPALA-10861: Optimize the plan for identical predicates
......................................................................


Patch Set 2: Verified+1


-- 
To view, visit http://gerrit.cloudera.org:8080/19511
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia249c8146215fad602e9310bf922c6bfa050b96b
Gerrit-Change-Number: 19511
Gerrit-PatchSet: 2
Gerrit-Owner: Baike Xia <xi...@163.com>
Gerrit-Reviewer: Baike Xia <xi...@163.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Yida Wu <wy...@gmail.com>
Gerrit-Comment-Date: Mon, 20 Feb 2023 13:21:25 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-10861: Optimize the plan for identical predicates

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/19511 )

Change subject: IMPALA-10861: Optimize the plan for identical predicates
......................................................................


Patch Set 1: Verified-1

Build failed: https://jenkins.impala.io/job/gerrit-verify-dryrun/9055/


-- 
To view, visit http://gerrit.cloudera.org:8080/19511
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia249c8146215fad602e9310bf922c6bfa050b96b
Gerrit-Change-Number: 19511
Gerrit-PatchSet: 1
Gerrit-Owner: Baike Xia <xi...@163.com>
Gerrit-Reviewer: Baike Xia <xi...@163.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Yida Wu <wy...@gmail.com>
Gerrit-Comment-Date: Fri, 17 Feb 2023 15:07:41 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-10861: Optimize the plan for identical predicates

Posted by "Baike Xia (Code Review)" <ge...@cloudera.org>.
Baike Xia has uploaded a new patch set (#2). ( http://gerrit.cloudera.org:8080/19511 )

Change subject: IMPALA-10861: Optimize the plan for identical predicates
......................................................................

IMPALA-10861: Optimize the plan for identical predicates

For hes query with two same predicates, duplicate data is deleted.

For example:
select * from a join b on a.id = b.id and a.id and b.id
where a.num > b.num and a.num > b.num
To:
select * from a join b on a.id = b.id where a.num > b.num

Testing:
 - Add fe tests

Change-Id: Ia249c8146215fad602e9310bf922c6bfa050b96b
---
M fe/src/main/java/org/apache/impala/planner/SingleNodePlanner.java
M testdata/workloads/functional-planner/queries/PlannerTest/join-order.test
M testdata/workloads/functional-planner/queries/PlannerTest/joins.test
M testdata/workloads/tpch/queries/tpch-outer-joins.test
4 files changed, 36 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/11/19511/2
-- 
To view, visit http://gerrit.cloudera.org:8080/19511
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ia249c8146215fad602e9310bf922c6bfa050b96b
Gerrit-Change-Number: 19511
Gerrit-PatchSet: 2
Gerrit-Owner: Baike Xia <xi...@163.com>
Gerrit-Reviewer: Baike Xia <xi...@163.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Yida Wu <wy...@gmail.com>

[Impala-ASF-CR] IMPALA-10861: Optimize the plan for identical predicates

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/19511 )

Change subject: IMPALA-10861: Optimize the plan for identical predicates
......................................................................


Patch Set 2:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/9057/ DRY_RUN=true


-- 
To view, visit http://gerrit.cloudera.org:8080/19511
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia249c8146215fad602e9310bf922c6bfa050b96b
Gerrit-Change-Number: 19511
Gerrit-PatchSet: 2
Gerrit-Owner: Baike Xia <xi...@163.com>
Gerrit-Reviewer: Baike Xia <xi...@163.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Yida Wu <wy...@gmail.com>
Gerrit-Comment-Date: Mon, 20 Feb 2023 08:16:26 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-10861: Optimize the plan for identical predicates

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/19511 )

Change subject: IMPALA-10861: Optimize the plan for identical predicates
......................................................................


Patch Set 3:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/9159/ DRY_RUN=true


-- 
To view, visit http://gerrit.cloudera.org:8080/19511
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia249c8146215fad602e9310bf922c6bfa050b96b
Gerrit-Change-Number: 19511
Gerrit-PatchSet: 3
Gerrit-Owner: Baike Xia <xi...@163.com>
Gerrit-Reviewer: Baike Xia <xi...@163.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Yida Wu <wy...@gmail.com>
Gerrit-Comment-Date: Tue, 21 Mar 2023 01:48:43 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-10861: Optimize the plan for identical predicates

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/19511 )

Change subject: IMPALA-10861: Optimize the plan for identical predicates
......................................................................


Patch Set 3:

Build Successful 

https://jenkins.impala.io/job/gerrit-code-review-checks/12649/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.


-- 
To view, visit http://gerrit.cloudera.org:8080/19511
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia249c8146215fad602e9310bf922c6bfa050b96b
Gerrit-Change-Number: 19511
Gerrit-PatchSet: 3
Gerrit-Owner: Baike Xia <xi...@163.com>
Gerrit-Reviewer: Baike Xia <xi...@163.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Yida Wu <wy...@gmail.com>
Gerrit-Comment-Date: Mon, 20 Mar 2023 17:50:25 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-10861: Optimize the plan for identical predicates

Posted by "Yida Wu (Code Review)" <ge...@cloudera.org>.
Yida Wu has posted comments on this change. ( http://gerrit.cloudera.org:8080/19511 )

Change subject: IMPALA-10861: Optimize the plan for identical predicates
......................................................................


Patch Set 3:

(2 comments)

Sorry for late feedback. Looks good to me, just one or two questions.

http://gerrit.cloudera.org:8080/#/c/19511/3/fe/src/main/java/org/apache/impala/analysis/Expr.java
File fe/src/main/java/org/apache/impala/analysis/Expr.java:

http://gerrit.cloudera.org:8080/#/c/19511/3/fe/src/main/java/org/apache/impala/analysis/Expr.java@1265
PS3, Line 1265:     for (C expr: origList) {
The time complexity can be O(n^2) in the worst case, because every conjuncts would need to call removeDuplicates() if my understanding is correct, do you think it necessary to optimize it?


http://gerrit.cloudera.org:8080/#/c/19511/3/testdata/workloads/functional-planner/queries/PlannerTest/joins.test
File testdata/workloads/functional-planner/queries/PlannerTest/joins.test:

http://gerrit.cloudera.org:8080/#/c/19511/3/testdata/workloads/functional-planner/queries/PlannerTest/joins.test@3122
PS3, Line 3122: ON c.c_custkey = l.l_orderkey and c.c_custkey = l.l_orderkey
Tried below query, the "other predicates" should remove the duplicates, but seems not as expected.
Query: explain SELECT c_custkey
from tpch.customer c
left outer join tpch.lineitem l
ON c.c_custkey = l.l_orderkey
where l.l_discount > c.c_acctbal and c.c_acctbal < l.l_discount
+-----------------------------------------------------------------------------+
| Explain String                                                              |
+-----------------------------------------------------------------------------+
| Max Per-Host Resource Reservation: Memory=30.50MB Threads=6                 |
| Per-Host Resource Estimates: Memory=819MB                                   |
|                                                                             |
| PLAN-ROOT SINK                                                              |
| |                                                                           |
| 05:EXCHANGE [UNPARTITIONED]                                                 |
| |                                                                           |
| 02:HASH JOIN [RIGHT OUTER JOIN, PARTITIONED]                                |
| |  hash predicates: l.l_orderkey = c.c_custkey                              |
| |  other predicates: c.c_acctbal < l.l_discount, l.l_discount > c.c_acctbal |
| |  runtime filters: RF000 <- c.c_custkey                                    |
| |  row-size=32B cardinality=575.77K                                         |
| |                                                                           |
| |--04:EXCHANGE [HASH(c.c_custkey)]                                          |
| |  |                                                                        |
| |  00:SCAN HDFS [tpch.customer c]                                           |
| |     HDFS partitions=1/1 files=1 size=23.08MB                              |
| |     row-size=16B cardinality=150.00K                                      |
| |                                                                           |
| 03:EXCHANGE [HASH(l.l_orderkey)]                                            |
| |                                                                           |
| 01:SCAN HDFS [tpch.lineitem l]                                              |
|    HDFS partitions=1/1 files=1 size=718.94MB                                |
|    runtime filters: RF000 -> l.l_orderkey                                   |
|    row-size=16B cardinality=6.00M                                           |
+-----------------------------------------------------------------------------+



-- 
To view, visit http://gerrit.cloudera.org:8080/19511
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia249c8146215fad602e9310bf922c6bfa050b96b
Gerrit-Change-Number: 19511
Gerrit-PatchSet: 3
Gerrit-Owner: Baike Xia <xi...@163.com>
Gerrit-Reviewer: Baike Xia <xi...@163.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Yida Wu <wy...@gmail.com>
Gerrit-Comment-Date: Wed, 03 May 2023 21:09:01 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-10861: Optimize the plan for identical predicates

Posted by "Baike Xia (Code Review)" <ge...@cloudera.org>.
Baike Xia has posted comments on this change. ( http://gerrit.cloudera.org:8080/19511 )

Change subject: IMPALA-10861: Optimize the plan for identical predicates
......................................................................


Patch Set 3:

(7 comments)

> Patch Set 2:
> 
> (7 comments)
> 
> Thanks Baike for the fix.

Hi Yida, 
Thanks for your advice and reply.
I made some fixes in response to your suggestions.
Looking forward to your reply and CR.

http://gerrit.cloudera.org:8080/#/c/19511/2//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/19511/2//COMMIT_MSG@9
PS2, Line 9: For the query with two same predicates, duplicated data is deleted
> Would be good to elaborate the comment on what the current issue is and how
OK, I'm going to optimize this description.


http://gerrit.cloudera.org:8080/#/c/19511/2//COMMIT_MSG@9
PS2, Line 9: the
> nit. the?
Done


http://gerrit.cloudera.org:8080/#/c/19511/2//COMMIT_MSG@9
PS2, Line 9: duplicate
> nit. duplicated
Done


http://gerrit.cloudera.org:8080/#/c/19511/2//COMMIT_MSG@12
PS2, Line 12: ing.
> Would it also work for below cases?
Done


http://gerrit.cloudera.org:8080/#/c/19511/2//COMMIT_MSG@12
PS2, Line 12: 
> should be a.id = b.id?
Done


http://gerrit.cloudera.org:8080/#/c/19511/2/testdata/workloads/functional-planner/queries/PlannerTest/joins.test
File testdata/workloads/functional-planner/queries/PlannerTest/joins.test:

http://gerrit.cloudera.org:8080/#/c/19511/2/testdata/workloads/functional-planner/queries/PlannerTest/joins.test@3118
PS2, Line 3118: the
> nit. the?
Done


http://gerrit.cloudera.org:8080/#/c/19511/2/testdata/workloads/functional-planner/queries/PlannerTest/joins.test@3118
PS2, Line 3118: duplicate
> nit. duplicated
Done



-- 
To view, visit http://gerrit.cloudera.org:8080/19511
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia249c8146215fad602e9310bf922c6bfa050b96b
Gerrit-Change-Number: 19511
Gerrit-PatchSet: 3
Gerrit-Owner: Baike Xia <xi...@163.com>
Gerrit-Reviewer: Baike Xia <xi...@163.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Yida Wu <wy...@gmail.com>
Gerrit-Comment-Date: Mon, 20 Mar 2023 17:30:17 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-10861: Optimize the plan for identical predicates

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/19511 )

Change subject: IMPALA-10861: Optimize the plan for identical predicates
......................................................................


Patch Set 1:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/9055/ DRY_RUN=true


-- 
To view, visit http://gerrit.cloudera.org:8080/19511
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia249c8146215fad602e9310bf922c6bfa050b96b
Gerrit-Change-Number: 19511
Gerrit-PatchSet: 1
Gerrit-Owner: Baike Xia <xi...@163.com>
Gerrit-Reviewer: Baike Xia <xi...@163.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Yida Wu <wy...@gmail.com>
Gerrit-Comment-Date: Fri, 17 Feb 2023 09:55:18 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-10861: Optimize the plan for identical predicates

Posted by "Yida Wu (Code Review)" <ge...@cloudera.org>.
Yida Wu has posted comments on this change. ( http://gerrit.cloudera.org:8080/19511 )

Change subject: IMPALA-10861: Optimize the plan for identical predicates
......................................................................


Patch Set 2:

(7 comments)

Thanks Baike for the fix.

http://gerrit.cloudera.org:8080/#/c/19511/2//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/19511/2//COMMIT_MSG@9
PS2, Line 9: For hes query with two same predicates, duplicate data is deleted.
Would be good to elaborate the comment on what the current issue is and how the solution is like.


http://gerrit.cloudera.org:8080/#/c/19511/2//COMMIT_MSG@9
PS2, Line 9: duplicate
nit. duplicated


http://gerrit.cloudera.org:8080/#/c/19511/2//COMMIT_MSG@9
PS2, Line 9: hes
nit. the?


http://gerrit.cloudera.org:8080/#/c/19511/2//COMMIT_MSG@12
PS2, Line 12: a.id = b.id and a.id and b.id
Would it also work for below cases?
a.id = b.id and b.id = a.id
a.num > b.num and b.num <= a.num


http://gerrit.cloudera.org:8080/#/c/19511/2//COMMIT_MSG@12
PS2, Line 12: a.id and b.id
should be a.id = b.id?


http://gerrit.cloudera.org:8080/#/c/19511/2/testdata/workloads/functional-planner/queries/PlannerTest/joins.test
File testdata/workloads/functional-planner/queries/PlannerTest/joins.test:

http://gerrit.cloudera.org:8080/#/c/19511/2/testdata/workloads/functional-planner/queries/PlannerTest/joins.test@3118
PS2, Line 3118: duplicate
nit. duplicated


http://gerrit.cloudera.org:8080/#/c/19511/2/testdata/workloads/functional-planner/queries/PlannerTest/joins.test@3118
PS2, Line 3118: hes
nit. the?



-- 
To view, visit http://gerrit.cloudera.org:8080/19511
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia249c8146215fad602e9310bf922c6bfa050b96b
Gerrit-Change-Number: 19511
Gerrit-PatchSet: 2
Gerrit-Owner: Baike Xia <xi...@163.com>
Gerrit-Reviewer: Baike Xia <xi...@163.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Yida Wu <wy...@gmail.com>
Gerrit-Comment-Date: Mon, 06 Mar 2023 02:50:34 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-10861: Optimize the plan for identical predicates

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/19511 )

Change subject: IMPALA-10861: Optimize the plan for identical predicates
......................................................................


Patch Set 1:

Build Successful 

https://jenkins.impala.io/job/gerrit-code-review-checks/12394/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.


-- 
To view, visit http://gerrit.cloudera.org:8080/19511
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia249c8146215fad602e9310bf922c6bfa050b96b
Gerrit-Change-Number: 19511
Gerrit-PatchSet: 1
Gerrit-Owner: Baike Xia <xi...@163.com>
Gerrit-Reviewer: Baike Xia <xi...@163.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Yida Wu <wy...@gmail.com>
Gerrit-Comment-Date: Fri, 17 Feb 2023 10:12:35 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-10861: Optimize the plan for identical predicates

Posted by "Baike Xia (Code Review)" <ge...@cloudera.org>.
Baike Xia has uploaded a new patch set (#3). ( http://gerrit.cloudera.org:8080/19511 )

Change subject: IMPALA-10861: Optimize the plan for identical predicates
......................................................................

IMPALA-10861: Optimize the plan for identical predicates

For the query with two same predicates, duplicated data is deleted.
This is only true for two semantically identical predicates.
'a = b and a = b', will delete one of them.
'a = b and b = a', same thing.
However, 'a > b and a >= b', will not apply to this optimization.

For example:
select * from a join b on a.id = b.id and a.id = b.id
where a.num > b.num and b.num < a.num
To:
select * from a join b on a.id = b.id where a.num > b.num

Testing:
 - Add fe tests

Change-Id: Ia249c8146215fad602e9310bf922c6bfa050b96b
---
M fe/src/main/java/org/apache/impala/analysis/BinaryPredicate.java
M fe/src/main/java/org/apache/impala/analysis/Expr.java
M fe/src/main/java/org/apache/impala/analysis/InPredicate.java
M fe/src/main/java/org/apache/impala/analysis/Predicate.java
M fe/src/main/java/org/apache/impala/planner/SingleNodePlanner.java
M testdata/workloads/functional-planner/queries/PlannerTest/join-order.test
M testdata/workloads/functional-planner/queries/PlannerTest/joins.test
M testdata/workloads/tpch/queries/tpch-outer-joins.test
8 files changed, 133 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/11/19511/3
-- 
To view, visit http://gerrit.cloudera.org:8080/19511
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ia249c8146215fad602e9310bf922c6bfa050b96b
Gerrit-Change-Number: 19511
Gerrit-PatchSet: 3
Gerrit-Owner: Baike Xia <xi...@163.com>
Gerrit-Reviewer: Baike Xia <xi...@163.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Yida Wu <wy...@gmail.com>

[Impala-ASF-CR] IMPALA-10861: Optimize the plan for identical predicates

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/19511 )

Change subject: IMPALA-10861: Optimize the plan for identical predicates
......................................................................


Patch Set 3: Verified-1

Build failed: https://jenkins.impala.io/job/gerrit-verify-dryrun/9157/


-- 
To view, visit http://gerrit.cloudera.org:8080/19511
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia249c8146215fad602e9310bf922c6bfa050b96b
Gerrit-Change-Number: 19511
Gerrit-PatchSet: 3
Gerrit-Owner: Baike Xia <xi...@163.com>
Gerrit-Reviewer: Baike Xia <xi...@163.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Yida Wu <wy...@gmail.com>
Gerrit-Comment-Date: Mon, 20 Mar 2023 22:38:34 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-10861: Optimize the plan for identical predicates

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/19511 )

Change subject: IMPALA-10861: Optimize the plan for identical predicates
......................................................................


Patch Set 3:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/9157/ DRY_RUN=true


-- 
To view, visit http://gerrit.cloudera.org:8080/19511
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia249c8146215fad602e9310bf922c6bfa050b96b
Gerrit-Change-Number: 19511
Gerrit-PatchSet: 3
Gerrit-Owner: Baike Xia <xi...@163.com>
Gerrit-Reviewer: Baike Xia <xi...@163.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Yida Wu <wy...@gmail.com>
Gerrit-Comment-Date: Mon, 20 Mar 2023 17:30:41 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-10861: Optimize the plan for identical predicates

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/19511 )

Change subject: IMPALA-10861: Optimize the plan for identical predicates
......................................................................


Patch Set 2:

Build Successful 

https://jenkins.impala.io/job/gerrit-code-review-checks/12397/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.


-- 
To view, visit http://gerrit.cloudera.org:8080/19511
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia249c8146215fad602e9310bf922c6bfa050b96b
Gerrit-Change-Number: 19511
Gerrit-PatchSet: 2
Gerrit-Owner: Baike Xia <xi...@163.com>
Gerrit-Reviewer: Baike Xia <xi...@163.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Yida Wu <wy...@gmail.com>
Gerrit-Comment-Date: Mon, 20 Feb 2023 08:36:03 +0000
Gerrit-HasComments: No