Riza Suminto has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/21684 )

Change subject: IMPALA-13302: Restore registering all conjuncts
......................................................................


Patch Set 8:

(3 comments)

Some nits to consider.

http://gerrit.cloudera.org:8080/#/c/21684/7/testdata/workloads/functional-planner/queries/PlannerTest/rewrite.test
File testdata/workloads/functional-planner/queries/PlannerTest/rewrite.test:

http://gerrit.cloudera.org:8080/#/c/21684/7/testdata/workloads/functional-planner/queries/PlannerTest/rewrite.test@1
PS7, Line 1: # IMPALA-13302: ExtractCommonConjunctRule led to non-materialized 
slot
nit: When this test fail, I see following error:

java.lang.IllegalStateException: Illegal reference to non-materialized slot: 
tid=8 sid=8

More detail (slot label / raw path) can be shown by making this change in 
SlotRef.java:

 -    Preconditions.checkState(desc_.isMaterialized(), String.format(
 -        "Illegal reference to non-materialized slot: tid=%s sid=%s",
 -        desc_.getParent().getId(), desc_.getId()));
 +    Preconditions.checkState(desc_.isMaterialized(),
 +        "Illegal reference to non-materialized slot: %s", this);

Which will show this error message:

java.lang.IllegalStateException: Illegal reference to non-materialized slot: 
t2.id (tid=8 sid=8)


http://gerrit.cloudera.org:8080/#/c/21684/7/testdata/workloads/functional-planner/queries/PlannerTest/rewrite.test@3
PS7, Line 3:     WHERE ((t.id = 1 and false) or (t.id = 1 and false)) AND t.id 
= 1 AND t.id = 1),
nit: Break the predicates in multiple line to clearly show the duplicates.

    WHERE ((t.id = 1 and false)
        or (t.id = 1 and false))
      AND t.id = 1
      AND t.id = 1),


http://gerrit.cloudera.org:8080/#/c/21684/7/testdata/workloads/functional-planner/queries/PlannerTest/rewrite.test@43
PS7, Line 43:     WHERE t.id = 1 AND t.id = 1 AND t.id = 1 AND false),
nit: Break the predicates in multiple line to clearly show the duplicates.

    WHERE t.id = 1
      AND t.id = 1
      AND t.id = 1
      AND false),

Since the old code breaks a loop in the middle, do you mind duplicating this 
code, but with 'false' predicate in the beginning of conjunct?

    WHERE false
      AND t.id = 1
      AND t.id = 1
      AND t.id = 1),

It might catch something in future if we do loop breaking like the old code.



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5959a3b3e18302e00b1d37e5f50410ebdb224cb0
Gerrit-Change-Number: 21684
Gerrit-PatchSet: 8
Gerrit-Owner: Michael Smith <[email protected]>
Gerrit-Reviewer: Csaba Ringhofer <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Joe McDonnell <[email protected]>
Gerrit-Reviewer: Michael Smith <[email protected]>
Gerrit-Reviewer: Quanlong Huang <[email protected]>
Gerrit-Reviewer: Riza Suminto <[email protected]>
Gerrit-Reviewer: Zoltan Borok-Nagy <[email protected]>
Gerrit-Comment-Date: Tue, 24 Sep 2024 17:15:18 +0000
Gerrit-HasComments: Yes

Reply via email to