kasakrisz commented on code in PR #4889: URL: https://github.com/apache/hive/pull/4889#discussion_r1403015571
########## ql/src/java/org/apache/hadoop/hive/ql/optimizer/GroupByOptimizer.java: ########## @@ -28,19 +28,11 @@ import java.util.Set; import java.util.Stack; +import org.apache.hadoop.hive.ql.exec.*; Review Comment: AFAIK Hive code style doesn't allow wild card imports. Here is some discussion why https://stackoverflow.com/questions/147454/why-is-using-a-wild-card-with-a-java-import-statement-bad Please revert this change. ########## ql/src/java/org/apache/hadoop/hive/ql/optimizer/GroupByOptimizer.java: ########## @@ -185,7 +177,12 @@ protected void processGroupBy(GroupByOptimizerContext ctx, // Dont remove the operator for distincts if (useMapperSort && (match == GroupByOptimizerSortMatch.COMPLETE_MATCH)) { - if (!groupByOpDesc.isDistinct()) { + boolean groupByHasFilter = false; + if (groupByOp.getChildOperators().get(0).getChildOperators().get(0).getChildOperators().get(0) Review Comment: In theory there can be any number of operators between a GBY and a Filter operator. GBY-FIL is also valid. -- 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]
