Hyukjin Kwon created SPARK-61189:
------------------------------------
Summary: Send the metadata edited in place of a StructType in the
schemas of mapInPandas, applyInPandas and the other map functions, in the
Python client as PySpark does
Key: SPARK-61189
URL: https://issues.apache.org/jira/browse/SPARK-61189
Project: Spark
Issue Type: Bug
Components: Connect
Affects Versions: connect-rust-4.3.0
Reporter: Hyukjin Kwon
The schema of mapInPandas, mapInArrow, applyInPandas (and the state schema of
transformWithState) was taken from the base snapshot of a StructType, which
only add() refreshes. A metadata edit in place after the struct was built,
st["a"].metadata["comment"] = "the a", was dropped, so the result schema had {}
where PySpark has {'comment': 'the a'}. The schema is now converted from the
live fields, as the other schema arguments already are. Repro:
df.mapInPandas(f, st).schema["a"].metadata.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]