Github user MaxGekk commented on the issue: https://github.com/apache/spark/pull/21699 > Considering you can just make a call to withColumn first I'm not really convinced in the utility of this PR. Purpose of the PR is to make pivot API consistent to `groupBy` and clear. Our users/clients shouldn't google workarounds like `withColumn` to apply the `pivot()` functions. I believe we should follow [the principle of least astonishment (POLA)](https://en.wikipedia.org/wiki/Principle_of_least_astonishment). Some of our clients forms `Column` expressions programmatically as a result of calculation. And for now, instead of just passing `Column` variable to `pivot()`, they have to modify whole expression, and inject projection or `withColumn`. /cc @ssimeonov
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org