You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "zhengruifeng (via GitHub)" <gi...@apache.org> on 2026/06/03 12:20:43 UTC

[PR] [WIP][SQL][PYTHON][CONNECT] Support DataFrame.zip in Spark Connect [spark]

zhengruifeng opened a new pull request, #56300:
URL: https://github.com/apache/spark/pull/56300

   ### What changes were proposed in this pull request?
   
   This is the follow-up to #54976 ([SPARK-55886]) which implemented `DataFrame.zip` for the classic path and deferred Spark Connect support. This PR wires up the Connect path end-to-end.
   
   - **Protocol (`relations.proto`)**: adds a `Zip` message with `left` and `right` `Relation` fields (field 48 in the `Relation` oneof). Python stubs regenerated via `buf 1.50.0` + `mypy==1.8.0` + `mypy-protobuf==3.3.0` + `ruff==0.14.8`.
   - **Server (`SparkConnectPlanner`)**: adds `transformZip` that delegates to `left.zip(right).logicalPlan` and dispatches via `RelTypeCase.ZIP`.
   - **Scala Connect `Dataset`**: replaces the `UnsupportedOperationException` stub with a `sparkSession.newDataFrame { builder => builder.getZipBuilder.setLeft(...).setRight(...) }` implementation, following the pattern used by `crossJoin`.
   - **Python Connect `plan.py`**: adds `class Zip(LogicalPlan)` following the `NearestByJoin` pattern.
   - **Python Connect `dataframe.py`**: replaces the `PySparkNotImplementedError` stub with a `plan.Zip` call; removes the doctest suppression (`del DataFrame.zip.__doc__`) that was added when Connect was unsupported.
   - **Tests**: updates `test_parity_zip.py` to run the full `DataFrameZipTestsMixin` against Connect instead of asserting `NOT_IMPLEMENTED`.
   
   ### Why are the changes needed?
   
   `DataFrame.zip` was merged (#54976) with Connect deferred. This PR completes the implementation so Connect users can use `zip` on equal footing with the classic path.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. `DataFrame.zip` now works on the Spark Connect path. Previously it raised `PySparkNotImplementedError: [NOT_IMPLEMENTED] zip is not implemented.`
   
   ### How was this patch tested?
   
   `test_parity_zip.py` now runs the full `DataFrameZipTestsMixin` (basic projections, expressions, one-sided base, `withColumn`, chained `withColumn`, longer chains, parent-with-chained-child, `withColumnRenamed`, scalar Python UDF, pandas UDF, and two error cases) against a Connect session.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-57247][SQL][CONNECT] Support DataFrame.zip in Spark Connect [spark]

Posted by "zhengruifeng (via GitHub)" <gi...@apache.org>.
zhengruifeng commented on PR #56300:
URL: https://github.com/apache/spark/pull/56300#issuecomment-4636868702

   thanks, merged to master/4.x


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-57247][SQL][CONNECT] Support DataFrame.zip in Spark Connect [spark]

Posted by "zhengruifeng (via GitHub)" <gi...@apache.org>.
zhengruifeng closed pull request #56300: [SPARK-57247][SQL][CONNECT] Support DataFrame.zip in Spark Connect
URL: https://github.com/apache/spark/pull/56300


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org