soumyakanti3578 commented on code in PR #6316:
URL: https://github.com/apache/hive/pull/6316#discussion_r2830622850
##########
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/HiveRelDistribution.java:
##########
@@ -95,9 +96,11 @@ public RelDistribution apply(TargetMapping mapping) {
tmp.put(aMapping.source, aMapping.target);
}
- for (Integer key : keys) {
- newKeys.add(tmp.get(key));
- }
+ keys.stream()
+ .map(tmp::get)
+ .filter(Objects::nonNull)
+ .forEach(newKeys::add);
Review Comment:
Makes sense. I have fixed this in the latest commit.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]