You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2024/05/21 13:12:00 UTC
[jira] [Updated] (SPARK-48373) Allow schema parameter of createDataFrame() to be length-1 list or tuple of StructType
[ https://issues.apache.org/jira/browse/SPARK-48373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ASF GitHub Bot updated SPARK-48373:
-----------------------------------
Labels: pull-request-available (was: )
> 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
> Priority: Major
> Labels: pull-request-available
>
> 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-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org