Steve Carlin has posted comments on this change. ( http://gerrit.cloudera.org:8080/23924 )
Change subject: IMPALA-14102: [part 3] Modified LoptOptimizeJoinRule with Impala changes ...................................................................... Patch Set 4: (3 comments) http://gerrit.cloudera.org:8080/#/c/23924/4/java/calcite-planner/src/main/java/org/apache/impala/calcite/schema/ImpalaRelMdCumulativeCost.java File java/calcite-planner/src/main/java/org/apache/impala/calcite/schema/ImpalaRelMdCumulativeCost.java: http://gerrit.cloudera.org:8080/#/c/23924/4/java/calcite-planner/src/main/java/org/apache/impala/calcite/schema/ImpalaRelMdCumulativeCost.java@86 PS4, Line 86: switch (ImpalaPlanRel.getRelNodeType(rel)) { > Why not use class dispatch with different implementations of getInputRefsFo The ImpalaPlanRel.getNodeType() method is a helper method for Calcite RelNode types. The RelNode here will be a Calcite specific RelNode, e.g. Aggregate. It will not be an ImpalaAggregateRel, so i can't create a method off of ImpalaAggregateRel. And then I figured awhile back that having a helper RelNode type created nicer looking code than having if rel instanceof Aggregate else if rel instanceof .... Unless I'm misunderstanding what you're saying. http://gerrit.cloudera.org:8080/#/c/23924/4/java/calcite-planner/src/main/java/org/apache/impala/calcite/schema/ImpalaRelMdNonCumulativeCost.java File java/calcite-planner/src/main/java/org/apache/impala/calcite/schema/ImpalaRelMdNonCumulativeCost.java: http://gerrit.cloudera.org:8080/#/c/23924/4/java/calcite-planner/src/main/java/org/apache/impala/calcite/schema/ImpalaRelMdNonCumulativeCost.java@117 PS4, Line 117: for (Integer i : mqContext.getInputRefs()) { > Why do we need this list if getAverageColumnSizes already returns a list? W Added a comment, hopefully this clarifies. http://gerrit.cloudera.org:8080/#/c/23924/4/java/calcite-planner/src/test/java/org/apache/impala/planner/TestLoptJoinRule.java File java/calcite-planner/src/test/java/org/apache/impala/planner/TestLoptJoinRule.java: http://gerrit.cloudera.org:8080/#/c/23924/4/java/calcite-planner/src/test/java/org/apache/impala/planner/TestLoptJoinRule.java@184 PS4, Line 184: HepProgramBuilder builder3 = new HepProgramBuilder(); > Can this be removed? Done -- To view, visit http://gerrit.cloudera.org:8080/23924 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I168ae903934c5c74520a22605e73f71dc0a9d549 Gerrit-Change-Number: 23924 Gerrit-PatchSet: 4 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: Mon, 02 Feb 2026 23:32:43 +0000 Gerrit-HasComments: Yes
