Stamatis Zampetakis has posted comments on this change. ( http://gerrit.cloudera.org:8080/24787 )
Change subject: IMPALA-15327: CTE rewrite algorithm cannot explore all suggestions ...................................................................... Patch Set 3: (3 comments) At the moment the problem is visible only on Q75 cause many other larger CTEs in TPC-DS queries are not rewritable (IMPALA-15334) so they are pruned for other reasons. http://gerrit.cloudera.org:8080/#/c/24787/2//COMMIT_MSG Commit Message: http://gerrit.cloudera.org:8080/#/c/24787/2//COMMIT_MSG@9 PS2, Line 9: The rewrite algorithm relies on the MaterializedViewRule hierarchy. In > I updated some commit formatting and fixed a typo. Great, thanks! http://gerrit.cloudera.org:8080/#/c/24787/2/java/calcite-planner/src/main/java/org/apache/impala/calcite/schema/ImpalaRelMdAllPredicates.java File java/calcite-planner/src/main/java/org/apache/impala/calcite/schema/ImpalaRelMdAllPredicates.java: http://gerrit.cloudera.org:8080/#/c/24787/2/java/calcite-planner/src/main/java/org/apache/impala/calcite/schema/ImpalaRelMdAllPredicates.java@36 PS2, Line 36: return mq.getAllPredicates(r.getCTE()); > Can you add a comment somewhere why returning null is the appropriate actio I pushed a new patch where the new metadata handlers use another Calcite interface and thus all these generic catch-all methods returning null were removed. FYI: Returning null from a metadata handler means I don't know how to handle this expression (no metadata available). These generic/catch all methods trigger if we don't have a registered handler for an expression (e.g., ImpalaCteProducer). Now that the catch all methods were removed from the ImpalaRelMd* handlers if we ever encounter an unsupported/unregistered RelNode subclass we will use Calcite's built-in catch all methods. http://gerrit.cloudera.org:8080/#/c/24787/2/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cte/tpcds-q75.test File testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cte/tpcds-q75.test: http://gerrit.cloudera.org:8080/#/c/24787/2/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cte/tpcds-q75.test@80 PS2, Line 80: Per-Host Resource Estimates: Memory=199.45GB > Unrelated, I've seen the CTE plans seem to increase the per-host resource e Ack -- To view, visit http://gerrit.cloudera.org:8080/24787 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ic32d11cd82e2484944b6d03d5fb56900e8e1b7a4 Gerrit-Change-Number: 24787 Gerrit-PatchSet: 3 Gerrit-Owner: Stamatis Zampetakis <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Michael Smith <[email protected]> Gerrit-Reviewer: Stamatis Zampetakis <[email protected]> Gerrit-Comment-Date: Fri, 04 Sep 2026 12:51:06 +0000 Gerrit-HasComments: Yes
