MaxGekk commented on a change in pull request #35433:
URL: https://github.com/apache/spark/pull/35433#discussion_r801717384
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/RelationalGroupedDataset.scala
##########
@@ -452,7 +453,13 @@ class RelationalGroupedDataset protected[sql](
case RelationalGroupedDataset.GroupByType =>
val valueExprs = values.map(_ match {
case c: Column => c.expr
- case v => Literal.apply(v)
+ case v =>
+ try {
+ Literal.apply(v)
Review comment:
Please, fix indentation.
##########
File path:
sql/core/src/test/scala/org/apache/spark/sql/errors/QueryExecutionErrorsSuite.scala
##########
@@ -134,7 +134,6 @@ class QueryExecutionErrorsSuite extends QueryTest with
SharedSparkSession {
.collect()
}
assert(e2.getMessage === "The feature is not supported: " +
- "literal for '[dotnet,Dummies]' of class " +
- "org.apache.spark.sql.catalyst.expressions.GenericRowWithSchema.")
+ "the input column is not supported for pivoting.")
Review comment:
It would be nice to give users more context, like:
```
The feature is not supported: pivoting by values of the column
'[dotnet,Dummies]' of the type 'struct'.
```
--
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]