Hyukjin Kwon created SPARK-61226:
------------------------------------
Summary: StructField.fromDDL returns a StructField and mis-parses
names and DDL column options
Key: SPARK-61226
URL: https://issues.apache.org/jira/browse/SPARK-61226
Project: Spark
Issue Type: Bug
Components: Connect
Affects Versions: connect-rust-4.3.0
Reporter: Hyukjin Kwon
The Python client overrode StructField.fromDDL to return a StructField by
splitting the string at the first whitespace. StructField.fromDDL("`x y` int")
gave the name "`x" with type struct<y`:int>, and StructField.fromDDL("a int not
null") raised ValueError. The result could not be used as a schema:
spark.createDataFrame([(1,)], StructField.fromDDL("a int")) raised
NOT_EXPECTED_TYPE. In PySpark, StructField inherits DataType.fromDDL, which
returns the parsed type (a StructType for "a int") and accepts the same DDL as
DataType.fromDDL.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]