viirya commented on code in PR #175:
URL:
https://github.com/apache/arrow-datafusion-comet/pull/175#discussion_r1518468140
##########
spark/src/main/scala/org/apache/comet/serde/QueryPlanSerde.scala:
##########
@@ -1783,6 +1783,13 @@ object QueryPlanSerde extends Logging with
ShimQueryPlanSerde {
if (aggregateExpressions.isEmpty) {
val hashAggBuilder = OperatorOuterClass.HashAggregate.newBuilder()
hashAggBuilder.addAllGroupingExprs(groupingExprs.map(_.get).asJava)
+ val attributes = groupingExpressions.map(_.toAttribute) ++
aggregateAttributes
+ val resultExprs = resultExpressions.map(exprToProto(_, attributes))
+ if (resultExprs.exists(_.isEmpty)) {
+ emitWarning(s"Unsupported result expressions found in:
${resultExpressions}")
+ return None
+ }
Review Comment:
Even `aggregateExpressions` is empty, we still need to assign result
expressions. This is the latest bug I found during fixing TPCDS query failures
in SortMergeJoin work.
--
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]