[ 
https://issues.apache.org/jira/browse/SPARK-37116?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17434183#comment-17434183
 ] 

Maciej Szymkiewicz commented on SPARK-37116:
--------------------------------------------

Sadly, this is not going to work. For example, this will typecheck, although 
incorrect. {{Tuple | List}} might work, but this probably more general problem 
in how we interact with JVM, not limited to typing issues.

 
{code:python}
from pyspark.sql import SparkSession

spark = SparkSession.builder.getOrCreate()

(spark.read
    .csv("foo.csv")
    .groupBy("foo")
    .pivot("bar", "baz")
    .sum()) {code}

> Allow sequences (tuples and lists) as pivot values argument in PySpark
> ----------------------------------------------------------------------
>
>                 Key: SPARK-37116
>                 URL: https://issues.apache.org/jira/browse/SPARK-37116
>             Project: Spark
>          Issue Type: Bug
>          Components: PySpark
>    Affects Versions: 3.3.0
>            Reporter: dch nguyen
>            Priority: Minor
>
> Both tuples and lists are accepted by PySpark on runtime.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to