File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
spark/src/main/scala/org/apache/comet/serde Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -1440,12 +1440,22 @@ object QueryPlanSerde extends Logging with CometExprShim {
14401440 return None
14411441 }
14421442
1443- val groupingExprs = groupingExpressions.map(exprToProto(_, child.output))
1444- if (groupingExprs.exists(_.isEmpty)) {
1445- withInfo(op, " Not all grouping expressions are supported" )
1443+ val groupingExprsWithInput =
1444+ groupingExpressions.map(expr => expr.name -> exprToProto(expr, child.output))
1445+
1446+ val emptyExprs = groupingExprsWithInput.collect {
1447+ case (expr, proto) if proto.isEmpty => expr
1448+ }
1449+
1450+ if (emptyExprs.nonEmpty) {
1451+ withInfo(
1452+ op,
1453+ s " Not all grouping expressions are supported. Unsupported: ${emptyExprs.mkString(" , " )}" )
14461454 return None
14471455 }
14481456
1457+ val groupingExprs = groupingExprsWithInput.map(_._2)
1458+
14491459 // In some of the cases, the aggregateExpressions could be empty.
14501460 // For example, if the aggregate functions only have group by or if the aggregate
14511461 // functions only have distinct aggregate functions:
You can’t perform that action at this time.
0 commit comments