forked from apache/spark
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SPARK-46082][PYTHON][CONNECT] Fix protobuf string representation for…
… Pandas Functions API with Spark Connect ### What changes were proposed in this pull request? This PR proposes to rename `_func` to `_functions` in the protobuf instances for Pandas Functions API with Spark Connect so the string presentation includes them (see also apache#39223). ### Why are the changes needed? In order to have the pretty string format for protobuf messages in Python side. ### Does this PR introduce _any_ user-facing change? Yes, ```bash ./bin/pyspark --remote local ``` ```python df = spark.range(1) print(df.mapInPandas(lambda x: x, df.schema)._plan.print()) ``` **Before:** ``` <MapPartitions is_barrier='False'> <Range start='0', end='1', step='1', num_partitions='None'> ``` **After:** ``` <MapPartitions function='<lambda>(id)', is_barrier='False'> <Range start='0', end='1', step='1', num_partitions='None'> ``` ### How was this patch tested? Manually tested as above. ### Was this patch authored or co-authored using generative AI tooling? No. Closes apache#43991 from HyukjinKwon/fix-print-proto. Authored-by: Hyukjin Kwon <[email protected]> Signed-off-by: Hyukjin Kwon <[email protected]>
- Loading branch information
1 parent
6c7ebe8
commit cd1ec48
Showing
2 changed files
with
8 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters