Hyukjin Kwon created SPARK-62264:
------------------------------------
Summary: Copy a message of the Python client's protobuf runtime
that a constructor keyword takes without a walk and a new object for each
nested message
Key: SPARK-62264
URL: https://issues.apache.org/jira/browse/SPARK-62264
Project: Spark
Issue Type: Improvement
Components: Connect
Affects Versions: 5.0.0
Reporter: Hyukjin Kwon
The protobuf runtime of the Python client
(crates/pyspark-rs/src/pbmsg/message.rs: message_for_field -> deeper_than +
duplicate_with -> copy_as) copies a runtime message that a constructor keyword
takes, such as MergeAction(condition=...) and Assignment(key=..., value=...).
The copy walks up to 100 levels for upb's depth limit, then builds a structural
deep copy with a new Python object for each nested message. Since SPARK-62214
(MergeIntoWriter as PySpark's Python class), a merge `update` clause takes 48.8
us against PySpark's 17.0 us, and `updateAll` 8.47 us against 2.25 us. Copy
such a message without the walk and without a new object for each nested
message, keeping upb's MaxDepth behavior as PySpark's (a DecodeError from 47-49
nested additions).
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]