cloud-fan commented on pull request #27066:
URL: https://github.com/apache/spark/pull/27066#issuecomment-632075377
I haven't looked at the patch yet, but looking at the proposed API
```
val result = data.withColumn("a", 'a.withFields(
("b", $"a.b".withFields(
("a", $"a.b.a".withFields(
("b", lit(5))))))))
```
This is a huge improvement to the original API, but I'm thinking if we can
do better. What if we make `withColumn` support nested fields? Then we can
further simplify the API:
```
val result = data.withColumn("a.b.a", lit(5))
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]