Skip to content

feat: route translate and to_csv through codegen dispatch by default#5032

Open
andygrove wants to merge 1 commit into
apache:mainfrom
andygrove:feat/incompat-codegen-dispatch
Open

feat: route translate and to_csv through codegen dispatch by default#5032
andygrove wants to merge 1 commit into
apache:mainfrom
andygrove:feat/incompat-codegen-dispatch

Conversation

@andygrove

@andygrove andygrove commented Jul 24, 2026

Copy link
Copy Markdown
Member

Which issue does this PR close?

Closes #.

Rationale for this change

translate (StringTranslate) and to_csv (StructsToCsv) have native implementations that are incompatible with Spark by default, so today the whole enclosing operator falls back to Spark unless allowIncompatible is set. Routing them through the JVM codegen dispatcher instead keeps the operator on the native pipeline while producing bit-exact Spark results, and preserves the faster native path as an opt-in.

What changes are included in this PR?

  • Route translate (StringTranslate) and to_csv (StructsToCsv) through the JVM codegen dispatcher by default, using the same NativeOptInAvailable pattern as to_json and split. The dispatcher runs Spark's own generated code (bit-exact) while keeping the operator on the native pipeline; the native path stays available via allowIncompatible.
  • Update the docs to note the codegen-dispatch default for to_csv.

How are these changes tested?

  • Update the string_translate SQL test (previously asserting fallback) to verify native codegen dispatch.
  • Add a to_csv SQL file test.

@andygrove andygrove added this to the 1.0.0 milestone Jul 24, 2026
`translate` (StringTranslate) and `to_csv` (StructsToCsv) have native
implementations that are incompatible with Spark by default, so today the whole
enclosing operator falls back to Spark unless allowIncompatible is set. Route
them through the JVM codegen dispatcher by default instead, using the same
NativeOptInAvailable pattern as `to_json` and `split`: the dispatcher runs
Spark's own generated code (bit-exact) while keeping the operator on the native
pipeline, and the faster native path stays available via allowIncompatible.

Update the translate SQL test (previously asserting fallback) to verify native
dispatch, and add a to_csv test.
@andygrove
andygrove force-pushed the feat/incompat-codegen-dispatch branch from 7cd0e22 to 3abb614 Compare July 24, 2026 23:01
@andygrove andygrove changed the title feat: route pow, translate, and to_csv through codegen dispatch by default feat: route translate and to_csv through codegen dispatch by default Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant