Joe McDonnell has posted comments on this change. ( http://gerrit.cloudera.org:8080/24079 )
Change subject: IMPALA-14820: Calcite Planner: Memory allocations are too high ...................................................................... Patch Set 2: (1 comment) http://gerrit.cloudera.org:8080/#/c/24079/2/java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteSingleNodePlanner.java File java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteSingleNodePlanner.java: http://gerrit.cloudera.org:8080/#/c/24079/2/java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteSingleNodePlanner.java@102 PS2, Line 102: private boolean hasTopLevelLimitOfOne(RelNode relNode) { : if (!(relNode instanceof Sort)) { : return false; : } : RexNode fetch = ((Sort) relNode).fetch; : return fetch != null && : ((BigDecimal) RexLiteral.value(fetch)).longValue() == 1; The second query you mention in the commit message doesn't use an order by. Is Sort just something Calcite always uses for a top level limit even if there isn't an order by? -- To view, visit http://gerrit.cloudera.org:8080/24079 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I9e84061b65f115ea65a9d2c2d40173843040ca0c Gerrit-Change-Number: 24079 Gerrit-PatchSet: 2 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-Comment-Date: Thu, 12 Mar 2026 23:59:57 +0000 Gerrit-HasComments: Yes
