Ian Cook created SPARK-48373:
--------------------------------

             Summary: Allow schema parameter of createDataFrame() to be 
length-1 list or tuple of StructType
                 Key: SPARK-48373
                 URL: https://issues.apache.org/jira/browse/SPARK-48373
             Project: Spark
          Issue Type: Improvement
          Components: PySpark
    Affects Versions: 3.5.1
            Reporter: Ian Cook


Currently in PySpark (both Classic and Connect), if a user passes a length-1 
list or tuple of {{StructType}} as the {{schema}} argument to 
{{{}createDataFrame{}}}, PySpark raises an unhelpful error message.

Unfortunately it is easy for this to happen. For example if a user leaves a 
trailing comma at the end of the line that defines the {{{}StructType{}}}.

Add some simple code to {{createDataFrame}} to handle this case more gracefully



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to