Hyukjin Kwon created SPARK-60982:
------------------------------------

             Summary: Build an array of a list or a NumPy array in lit() in 
Spark Connect Rust as PySpark does
                 Key: SPARK-60982
                 URL: https://issues.apache.org/jira/browse/SPARK-60982
             Project: Spark
          Issue Type: Bug
          Components: Connect
    Affects Versions: connect-rust-4.3.0
            Reporter: Hyukjin Kwon


In PySpark, {{lit}} of a list builds an array of the literals of its elements: 
{{F.lit([1, 2])}} is {{array(1, 2)}}, and a list with a Column raises 
{{PySparkValueError}} {{COLUMN_IN_LIST}}. A one-dimensional NumPy array becomes 
such an array cast to the array type of its dtype, and a dtype without a Spark 
type raises {{UNSUPPORTED_NUMPY_ARRAY_SCALAR}}. The Rust-backed Python client 
raises {{TypeError: Expected Column or scalar ...; got list}} for a list. Build 
the array as PySpark does.




--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to