Aleksandr Efimov has posted comments on this change. ( http://gerrit.cloudera.org:8080/24657 )
Change subject: IMPALA-13534: Implement runtime filters on CTEs ...................................................................... Patch Set 2: (2 comments) http://gerrit.cloudera.org:8080/#/c/24657/2/fe/src/main/java/org/apache/impala/planner/RuntimeFilterGenerator.java File fe/src/main/java/org/apache/impala/planner/RuntimeFilterGenerator.java: http://gerrit.cloudera.org:8080/#/c/24657/2/fe/src/main/java/org/apache/impala/planner/RuntimeFilterGenerator.java@1178 PS2, Line 1178: generateFiltersRecursive(ctx, child); I think this can visit the same producer more than once. DistributedPlanner attaches the same CTEProducerNode to every consumer. If a CTE is used twice and its producer contains a join, this walks the join twice and generates another set of runtime filters with new IDs. Could we visit each producer only once and add a test for a joined CTE used twice? http://gerrit.cloudera.org:8080/#/c/24657/2/fe/src/main/java/org/apache/impala/planner/RuntimeFilterGenerator.java@1448 PS2, Line 1448: finalizeRuntimeFilter(filter); Should we finalize the filter here? A filter can have more than one target on the probe side. For example, with a UNION ALL over two consumers of the same CTE, the first consumer finalizes the filter and the second one is skipped. We need to keep it out of the producer, but finalizing it here looks too early. Could you add a test for this case? -- To view, visit http://gerrit.cloudera.org:8080/24657 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ic877fb590187826f828da6a27bf274465c381e8e Gerrit-Change-Number: 24657 Gerrit-PatchSet: 2 Gerrit-Owner: Michael Smith <[email protected]> Gerrit-Reviewer: Aleksandr Efimov <[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-Comment-Date: Wed, 05 Aug 2026 15:14:11 +0000 Gerrit-HasComments: Yes
