Github user maryannxue commented on a diff in the pull request:
https://github.com/apache/spark/pull/22030#discussion_r208466779
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/RelationalGroupedDataset.scala ---
@@ -335,7 +337,7 @@ class RelationalGroupedDataset protected[sql](
* @since 1.6.0
*/
def pivot(pivotColumn: String, values: Seq[Any]):
RelationalGroupedDataset = {
- pivot(Column(pivotColumn), values)
+ pivot(Column(pivotColumn), values.map(lit))
--- End diff --
> This is going to allow pivot(String, Seq[Any]) also take Column
I think using "lit" here is causing the confusion then (perhaps @MaxGekk
was not aware of that?). We should keep the current behavior of this signature
as it is. Using `Column(Literal.create(value))` would do.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]