File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
spark/src/main/scala/org/apache/comet/serde Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -1305,12 +1305,20 @@ object QueryPlanSerde extends Logging with CometExprShim {
13051305 return None
13061306 }
13071307
1308- val groupingExprs = groupingExpressions.map(exprToProto(_, child.output))
1309- if (groupingExprs.exists(_.isEmpty)) {
1310- withInfo(op, " Not all grouping expressions are supported" )
1308+ val groupingExprsWithInput =
1309+ groupingExpressions.map(expr => expr.name -> exprToProto(expr, child.output))
1310+
1311+ val emptyExprs = groupingExprsWithInput.collect {
1312+ case (expr, proto) if proto.isEmpty => expr
1313+ }
1314+
1315+ if (emptyExprs.nonEmpty) {
1316+ withInfo(op, s " Unsupported group expressions: ${emptyExprs.mkString(" , " )}" )
13111317 return None
13121318 }
13131319
1320+ val groupingExprs = groupingExprsWithInput.map(_._2)
1321+
13141322 // In some of the cases, the aggregateExpressions could be empty.
13151323 // For example, if the aggregate functions only have group by or if the aggregate
13161324 // functions only have distinct aggregate functions:
You can’t perform that action at this time.
0 commit comments