Aleksandr Efimov has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/24597 )

Change subject: IMPALA-7996: Optimize constant-false outer joins
......................................................................


Patch Set 6:

The first full precommit got past the goldens and stopped on the 
descriptor-table check in the same test: the pruned side has no scan ranges, 
but its partitions are still in the descriptor. HdfsScanNode registers them 
through addReferencedPartition() while its subtree is built, and we replace 
that subtree with an EmptySetNode afterwards, so DescriptorTable.toThrift() 
still ships them to the backend.

Elsewhere the planner avoids this by never building the scan - createScanNode() 
returns an EmptySetNode when the conjuncts are implied false, before anything 
is registered. DescriptorTable only offers addReferencedPartition(), so there 
is nothing to undo after the fact.

Three ways out, and I'd rather hear which you prefer than rewrite blindly:

- Decide the constant-false case before planning the pruned side. Clean for 
left outer joins, where the ON clause belongs to the table ref being planned; 
harder for right and full outer, where that side is built before the ON clause 
is known.
- Recompute the referenced partitions at the end of planning from the scans 
actually present in the tree. That repairs the general mechanism rather than 
this patch, so it is a bigger call.
- Drop the EmptySetNode and keep only the impossible hash predicate. Simplest, 
but then the build side is still read, which is most of what this change is for.

Happy to implement whichever you pick - the first one is my default if you have 
no preference.


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I6505825fc958720eec12e13d546661834f221b80
Gerrit-Change-Number: 24597
Gerrit-PatchSet: 6
Gerrit-Owner: Aleksandr Efimov <[email protected]>
Gerrit-Reviewer: Aleksandr Efimov <[email protected]>
Gerrit-Reviewer: Csaba Ringhofer <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Michael Smith <[email protected]>
Gerrit-Reviewer: Paul Rogers <[email protected]>
Gerrit-Reviewer: Steve Carlin <[email protected]>
Gerrit-Reviewer: Yifan Zhang <[email protected]>
Gerrit-Comment-Date: Wed, 19 Aug 2026 19:55:34 +0000
Gerrit-HasComments: No

Reply via email to