Steve Carlin has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/22411 )

Change subject: IMPALA-13716: Calcite Planner: TupleIsNullPredicate fix for 
analytic functions
......................................................................


Patch Set 8:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/22411/8/fe/src/main/java/org/apache/impala/planner/AnalyticPlanner.java
File fe/src/main/java/org/apache/impala/planner/AnalyticPlanner.java:

http://gerrit.cloudera.org:8080/#/c/22411/8/fe/src/main/java/org/apache/impala/planner/AnalyticPlanner.java@154
PS8, Line 154:         tupleIsNullPreds = emptyPreds;
> Just noticed this part of the code was changed in the last patchset.  Based
It would have to be in the firstSortGroup, not the last.  The tupleIsNullPreds 
is set as a parameter coming in, then we set it to empty for all other 
iterations.

Not sure how best to do this.  Either way, I'm adding some extra processing.

I could do something similar and have

boolean firstSortGroup = (i == 0 && j == 0)

and then within the createSortGroupPlan have

firstSortGroup ? tupleIsNullPreds : emptyPreds

If I place that code right next to the lastSortGroup code, I'm calculating 
firstSortGroup every iteration.

Even if I put firstSortGroup outside the loop, which is possible, I would still 
be processing a if/else every loop.

So I just decided to go this way since it seemed to be the simplest amount of 
code.  Not sure it is the easiest to read, and I don't particularly love 
overwriting a variable passed in (as harmless as that is).

I have no strong preferences though as to how to do this.  I'm willing to 
change to something else if you think it's better.



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Iaec363c2fa93a1e21bf74a40e5399e21ddd9bd60
Gerrit-Change-Number: 22411
Gerrit-PatchSet: 8
Gerrit-Owner: Steve Carlin <[email protected]>
Gerrit-Reviewer: Aman Sinha <[email protected]>
Gerrit-Reviewer: Fang-Yu Rao <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Joe McDonnell <[email protected]>
Gerrit-Reviewer: Michael Smith <[email protected]>
Gerrit-Reviewer: Steve Carlin <[email protected]>
Gerrit-Comment-Date: Tue, 25 Feb 2025 19:33:17 +0000
Gerrit-HasComments: Yes

Reply via email to