[
https://issues.apache.org/jira/browse/SPARK-61539?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Hyukjin Kwon updated SPARK-61539:
---------------------------------
Fix Version/s: connect-rust-4.3.0
> Raise PySpark's TypeError for a jdbc property whose key is not a str, in the
> Python client
> ------------------------------------------------------------------------------------------
>
> Key: SPARK-61539
> URL: https://issues.apache.org/jira/browse/SPARK-61539
> Project: Spark
> Issue Type: Bug
> Components: Connect
> Affects Versions: connect-rust-4.3.0
> Reporter: Hyukjin Kwon
> Priority: Major
> Fix For: connect-rust-4.3.0
>
>
> PySpark's DataFrameReader.jdbc and DataFrameWriter.jdbc pass the properties
> as `options(**properties)`. A key that is not a str raises the TypeError of
> that unpacking, "keywords must be strings", before any property is set. The
> format, the options of a column (reader) and the mode (writer) are already
> set on the reader or writer by then.
> The Python client sent the str() of each key as an option name instead:
> properties={b"user": "u"} set an option "b'user'", so the user property was
> silently lost, and {1: "v"} set an option "1". The jdbc methods now raise
> PySpark's TypeError, and keep the reader's and the writer's settings as
> PySpark's do. A str key is set as protobuf takes it (crate::str_argument),
> not through str().
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]