Skip to content

Add Spark 4.0 scalar Arrow UDF and grouped-map support - #1256

Open
SparkSnail wants to merge 1 commit into
mainfrom
users/shinyang/spark-4_0-arrow-udf
Open

Add Spark 4.0 scalar Arrow UDF and grouped-map support#1256
SparkSnail wants to merge 1 commit into
mainfrom
users/shinyang/spark-4_0-arrow-udf

Conversation

@SparkSnail

Copy link
Copy Markdown
Contributor

Summary

Add Spark 4.0.x support for scalar Arrow UDFs (eval type 200) and grouped-map UDFs (eval type 201), using both Apache Arrow and Microsoft.Data.Analysis representations.

Changes

  • Add Spark 4-specific command parsing and execution for the two supported eval types.
  • Pass the declared grouped-map schema consistently to the JVM and .NET Worker.
  • Validate output shape, schema, types, and nullability before returning results.
  • Handle Arrow stream completion and failures without appending protocol frames to partially written output.
  • Preserve existing Spark 2.x/3.x routing and command formats.
  • Add unit and E2E coverage, and include the ArrowUdf category in Spark 4.0.0–4.0.4 CI lanes on Windows and Linux.

Validation

  • Managed unit tests: 225 passed.
  • Worker unit tests: 243 passed; one Linux-only test skipped on Windows.
  • Worker builds: net472, net48, and net8.0 succeeded with no warnings or errors.
  • Local Spark 4.0.4 E2E on Windows and Linux: 23 passed per platform, covering Arrow UDFs and existing compatibility cases.
  • Local official Apache Spark 3.5.3 Arrow regression tests on Windows and Linux: 6 passed per platform; 8 Spark 4-only tests skipped.

Support eval types 200 and 201 with Arrow and DataFrame representations, bounded command parsing, output validation, and failure-safe stream framing. Preserve Spark 2/3 routing and add unit and cross-platform Arrow E2E coverage.
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@SparkSnail

Copy link
Copy Markdown
Contributor Author

/AzurePipelines run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@SparkSnail
SparkSnail marked this pull request as ready for review September 9, 2026 12:19
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

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