Michael Smith has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/24074 )

Change subject: IMPALA-14482: Calcite planner: order by "random()" fixed
......................................................................


Patch Set 3:

(3 comments)

I wish this were simpler, but seems fine.

http://gerrit.cloudera.org:8080/#/c/24074/3/java/calcite-planner/src/main/java/org/apache/impala/calcite/rules/ImpalaSortRemoveConstantKeysRule.java
File 
java/calcite-planner/src/main/java/org/apache/impala/calcite/rules/ImpalaSortRemoveConstantKeysRule.java:

http://gerrit.cloudera.org:8080/#/c/24074/3/java/calcite-planner/src/main/java/org/apache/impala/calcite/rules/ImpalaSortRemoveConstantKeysRule.java@62
PS3, Line 62:     final RexBuilder rexBuilder = 
sort.getCluster().getRexBuilder();
nit: this rexBuilder is unused.


http://gerrit.cloudera.org:8080/#/c/24074/3/java/calcite-planner/src/main/java/org/apache/impala/calcite/rules/ImpalaSortRemoveConstantKeysRule.java@83
PS3, Line 83:         sort.copy(sort.getTraitSet(), input, 
RelCollations.of(collationsList));
This has changed in Calcite 1.41.0. Should we pick up 
https://github.com/apache/calcite/blob/calcite-1.41.0/core/src/main/java/org/apache/calcite/rel/rules/SortRemoveConstantKeysRule.java#L91?


http://gerrit.cloudera.org:8080/#/c/24074/3/java/calcite-planner/src/main/java/org/apache/impala/calcite/rules/ImpalaSortRemoveConstantKeysRule.java@95
PS3, Line 95:     if (!predicates.constantMap.containsKey(inputRef)) {
Is there a way we could make sure NON_DETERMINISTIC_FNS don't get put in the 
constantMap? It seems like we shouldn't have to completely override onMatch to 
make this happen.



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I6ebf3aa11030d98b447d08d1364f5f65eb2ca661
Gerrit-Change-Number: 24074
Gerrit-PatchSet: 3
Gerrit-Owner: Steve Carlin <[email protected]>
Gerrit-Reviewer: Aman Sinha <[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 17:26:25 +0000
Gerrit-HasComments: Yes

Reply via email to