Skip to content

[POC][DONOTMERGE] Explore transpilation yet again spark 14083 but this time with some python too - #53547

Closed
holdenk wants to merge 25 commits into
apache:masterfrom
holdenk:explore-transpilation-yet-again-SPARK-14083-but-this-time-with-some-python-too
Closed

[POC][DONOTMERGE] Explore transpilation yet again spark 14083 but this time with some python too#53547
holdenk wants to merge 25 commits into
apache:masterfrom
holdenk:explore-transpilation-yet-again-SPARK-14083-but-this-time-with-some-python-too

Conversation

@holdenk

Copy link
Copy Markdown
Contributor

[POC][DONOTMERGE] Explore transpilation yet again spark 14083 but this time with some python too

sfc-gh-hkarauand others added 25 commits December 1, 2025 13:06
…o transpilation and what not.
Co-authored-by: Holden Karau <holden@pigscanfly.ca>
Co-authored-by: Holden Karau <holden@pigscanfly.ca>
Co-authored-by: Holden Karau <holden@pigscanfly.ca>
Co-authored-by: Holden Karau <holden@pigscanfly.ca>
… resolution checker sad. We could do it "earlier" but I'm also thinking maybe doing this Scala side is not "the way" but it feels "close" so I want to get it working for at least a binary operator and then we can experiment with doing it Python side next. Counter intuitively I think the typing Python side might actually be better here (although tbf depends on if lib/ast.py is typed which I have not checked but I suspect it is).
Co-authored-by: Holden Karau <holden@pigscanfly.ca>
…trings (oops)
Co-authored-by: Holden Karau <holden@pigscanfly.ca>
… upgrade our types for us maybe?
Co-authored-by: Holden Karau <holden@pigscanfly.ca>
Co-authored-by: Holden Karau <holden@pigscanfly.ca>
… is not an expr which is what we want but we should add some tests for non convertible UDF-> convertible UDF -> non convertible UDF.
Co-authored-by: Holden Karau <holden@pigscanfly.ca>
…cala (my bad)
Co-authored-by: Holden Karau <holden@pigscanfly.ca>
…tion of the trait so we can call it in the UDF Expression swap.
Co-authored-by: Holden Karau <holden@pigscanfly.ca>
Co-authored-by: Holden Karau <holden@pigscanfly.ca>
Co-authored-by: Holden Karau <holden@pigscanfly.ca>
Co-authored-by: Holden Karau <holden@pigscanfly.ca>
Co-authored-by: Holden Karau <holden@pigscanfly.ca>
Co-authored-by: Holden Karau <holden@pigscanfly.ca>
Co-authored-by: Holden Karau <holden@pigscanfly.ca>
Co-authored-by: Holden Karau <holden@pigscanfly.ca>
…3-but-this-time-with-some-python-too
Co-authored-by: Holden Karau <holden@pigscanfly.ca>
Co-authored-by: Holden Karau <holden@pigscanfly.ca>
… for Python to provide the catalyst expr too.
Co-authored-by: Holden Karau <holden@pigscanfly.ca>
Co-authored-by: Holden Karau <holden@pigscanfly.ca>
…ythonFunction.
Co-authored-by: Holden Karau <holden@pigscanfly.ca>
Co-authored-by: Holden Karau <holden@pigscanfly.ca>
Co-authored-by: Holden Karau <holden@pigscanfly.ca>
@holdenk
holdenkforce-pushed the explore-transpilation-yet-again-SPARK-14083-but-this-time-with-some-python-too branch from 54d3915 to facade3CompareDecember 19, 2025 20:33
@dongjoon-hyun
dongjoon-hyun marked this pull request as draft February 25, 2026 23:10
@holdenkholdenk closed this Jun 4, 2026
asf-gitbox-commits pushed a commit that referenced this pull request Aug 3, 2026
…ation with python
### What changes were proposed in this pull request?
This is the first PR adding initial transpilation from Python to Catalyst and the framework for others to plug in different transpilers which can target other targets. This replaces #53547 and is the first PR as part of the transpilation SPIP https://docs.google.com/document/d/1cHc6tiR4yO3hppTzrK1F1w9RwyEPMvaeEuL2ub2LURg/edit?tab=t.0#heading=h.iz92aps6qbo5
### Why are the changes needed?
Python UDF performance has been a perinial challenge in Spark, and while PyArrow makes the data copy slightly less expensive it's still much slower than native code. Additionally, Python UDF usage has increased substantailly with Pandas on Spark and it is especially hard for folks to write catalyst expressions here.
### Does this PR introduce _any_ user-facing change?
New configuration flags are user visible (default to off).
### How was this patch tested?
New unit tests that trigger always and hypothesis tests that trigger only selectively.
### Was this patch authored or co-authored using generative AI tooling?
Hypothesis teests were generated by Claude 4.7, eq semantics null and truthiness w/claude 4.6, GH code review (unknown backing model) on itiial draft). snake camel swap with sonnet.
Closes#56327 from holdenk/r3-SPARK-55206-transpilation-minimal-functional-impl-python.
Lead-authored-by: Holden Karau <holden@pigscanfly.ca>
Co-authored-by: Holden Karau <holden.karau@snowflake.com>
Signed-off-by: Holden Karau <holden.karau@snowflake.com>
asf-gitbox-commits pushed a commit that referenced this pull request Aug 3, 2026
…ation with python
### What changes were proposed in this pull request?
This is the first PR adding initial transpilation from Python to Catalyst and the framework for others to plug in different transpilers which can target other targets. This replaces #53547 and is the first PR as part of the transpilation SPIP https://docs.google.com/document/d/1cHc6tiR4yO3hppTzrK1F1w9RwyEPMvaeEuL2ub2LURg/edit?tab=t.0#heading=h.iz92aps6qbo5
### Why are the changes needed?
Python UDF performance has been a perinial challenge in Spark, and while PyArrow makes the data copy slightly less expensive it's still much slower than native code. Additionally, Python UDF usage has increased substantailly with Pandas on Spark and it is especially hard for folks to write catalyst expressions here.
### Does this PR introduce _any_ user-facing change?
New configuration flags are user visible (default to off).
### How was this patch tested?
New unit tests that trigger always and hypothesis tests that trigger only selectively.
### Was this patch authored or co-authored using generative AI tooling?
Hypothesis teests were generated by Claude 4.7, eq semantics null and truthiness w/claude 4.6, GH code review (unknown backing model) on itiial draft). snake camel swap with sonnet.
Closes#56327 from holdenk/r3-SPARK-55206-transpilation-minimal-functional-impl-python.
Lead-authored-by: Holden Karau <holden@pigscanfly.ca>
Co-authored-by: Holden Karau <holden.karau@snowflake.com>
Signed-off-by: Holden Karau <holden.karau@snowflake.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@holdenk@sfc-gh-hkarau