Github user marmbrus commented on the pull request:
https://github.com/apache/spark/pull/4346#issuecomment-73154430
Thanks for pointing out this issue and working on a solution!
I'm a little hesitant to bake the solution into JSON as this seems like
something that could happen with any data source. Also it seems like you might
be able to work around it without making changes to the library itself. Would
something like this work for you (assuming I add `coalesce` to the dataframe
DSL)?
```scala
val projection = df.schema
.map(_.name)
.groupBy(_.toLowerCase)
.map {
case (lowerCase, otherCases) =>
coalsece(otherCases.map(df(_)).as(lowerCase))
}
df.select(projection: _*)
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]