cloud-fan commented on pull request #27066: URL: https://github.com/apache/spark/pull/27066#issuecomment-632087480
I went through the discussion in the JIRA, there is one interesting use case ``` data.withColumn("newArray", transform('array, structElem => structElem.withField("d", lit("hello")))).show(false) ``` I agree that it's necessary to add more APIs in `Column`, so that it's easier to use higher-order functions to operate nested fields. Given the fact that we can always reuse the APIs of `Column` with `Dataset.withColumn`, it seems fine to only add APIs to `Column`. Is it possible to support `data.withColumn("a", $"a".withField("b.a", lit(5)))`? This is much simpler to use IMO. ---------------------------------------------------------------- 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: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org