cloud-fan commented on code in PR #36325:
URL: https://github.com/apache/spark/pull/36325#discussion_r858275445
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/AggregatePushDownUtils.scala:
##########
@@ -179,7 +183,11 @@ object AggregatePushDownUtils {
partitionSchema: StructType,
aggregation: Aggregation,
partitionValues: InternalRow): InternalRow = {
- val groupByColNames = aggregation.groupByColumns.map(_.fieldNames.head)
+ val groupByColNames =
+ aggregation.groupByExpressions.map { expr =>
+ assert(expr.isInstanceOf[FieldReference])
Review Comment:
ditto, we can even have a common function to extract column name
```
private def extractColName(v2Expr: V2Expression): Option[String] = ...
```
--
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]