ngsg commented on code in PR #6128:
URL: https://github.com/apache/hive/pull/6128#discussion_r2432056427
##########
ql/src/java/org/apache/hadoop/hive/ql/optimizer/GroupingSetOptimizer.java:
##########
@@ -227,7 +227,8 @@ private String selectPartitionColumn(GroupByOperator gby,
Operator<?> parentOp)
String partitionCol = null;
for (ColStatistics col: columnStatistics) {
String colName = col.getColumnName();
- if (parentOp.getColumnExprMap().containsKey(colName) &&
candidates.contains(colName)) {
+ if (null != parentOp.getColumnExprMap() &&
parentOp.getColumnExprMap().containsKey(colName) &&
+ candidates.contains(colName)) {
Review Comment:
I also agree that the null check would be better placed in
`isParentOpFeasible` or at the beginning of this method. As the author of this
optimizer, it looks like I forgot to include a null check at the top of this
method.
https://github.com/apache/hive/blob/5050529286c7ae131af0602f22e75c2ab72319fe/ql/src/java/org/apache/hadoop/hive/ql/optimizer/GroupingSetOptimizer.java#L185-L189
--
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]