Skip to content

[DATAFU-182] feat(spark): add Spark 3.5 support - #55

Merged
eyala merged 2 commits into
apache:mainfrom
InbalHoni:feature/spark-3.5
Oct 8, 2026
Merged

eyala merged 2 commits into
apache:mainfrom
InbalHoni:feature/spark-3.5

Conversation

@InbalHoni

@InbalHoni InbalHoni commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds support for Spark 3.5.x by extending the Scala 2.12 build and test matrix
through Spark 3.5.9, updating the compatibility documentation, and moving CI
to Python 3.8 as required by Spark 3.5.

Validation

Before opening this PR, I manually ran the tests workflow from feature/ spark-3.5 on my origin fork. The workflow completed successfully .

Extend DataFu Spark compatibility to the Spark 3.5 release line.

JIRA: DATAFU-182
@eyala

eyala commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

It looks good! One question - if you didn't change any of the actual source files, only changed the Python version used in testing, maybe that means that version 2.1.0 does support Spark 3.5.x, and we can update that in the README instead of 2.2.0

@InbalHoni

Copy link
Copy Markdown
Contributor Author

It looks good! One question - if you didn't change any of the actual source files, only changed the Python version used in testing, maybe that means that version 2.1.0 does support Spark 3.5.x, and we can update that in the README instead of 2.2.0

Right, the source files are effectively unchanged. 2.1.0's declared range was 3.0.x–3.4.x, so the question is whether we want to retroactively extend that declared range to include 3.5.x, or bump to 2.2.0 and give that the wider range.

@uzadude

uzadude commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

Thanks for this! One concern I wanted to check before we update the compatibility table: build_and_test_spark.sh recompiles datafu-spark for each Spark version, so the matrix proves source compatibility. But we publish a single datafu-spark_2.12 jar, and Scala code that touches Spark internals (we use Catalyst's Collect, DeclarativeAggregate, TypeUtils, PythonRunner, etc.) can compile fine against 3.5 yet fail at runtime when the jar was compiled against an older Spark.

So I tested the actual released artifact:

  • The published 2.1.0 POM shows it was compiled against Spark 3.2.4 (the default sparkVersion in gradle.properties).
  • I took this PR's tree, removed datafu-spark/src/main, and added the published datafu-spark_2.12-2.1.0.jar from Maven Central as a dependency instead. Then I ran ./gradlew :datafu-spark:test -PscalaVersion=2.12 -PsparkVersion=3.5.9 on Java 8. compileScala was NO-SOURCE, and the test runtime classpath resolved spark-core/sql/catalyst/hive to 3.5.9.
  • All 30 tests passed: DataFrameOpsTests (16), TestAggregators (7), UdafTests (4), TestScalaPythonBridge (3).
  • TypeUtils.checkForOrderingExpr(DataType, String), the internal API I was most worried about, has the same signature in 3.2.4, 3.3.4, 3.4.2 and 3.5.9.

Also, datafu-spark/src and datafu-spark/build.gradle are unchanged since release-2.1.0-rc0. So I agree with @eyala that we can extend the 2.1.0 row to 3.0.x - 3.5.x rather than add a 2.2.0 row (gradle.properties is still at 2.1.0 anyway).

Caveats: I only ran this against 3.5.9, not 3.5.0–3.5.8, and tests only cover what they exercise.

A couple of smaller things:

  • CI runs with -q, so only 3.5.9 was exercised by the new matrix entries. Did you run the full 3.5.0–3.5.8 list locally?
  • site/source/docs/spark/getting-started.html.markdown.erb and site/source/docs/spark/guide.html.markdown.erb still say 3.4.2, and changes.md could use a DATAFU-182 entry.

Separately, and not blocking this PR: it might be worth a follow-up JIRA for a CI job that builds the jar once with the release sparkVersion and then runs the tests against the latest patch of each supported minor version using that jar, so the compatibility table reflects binary compatibility of what we actually ship.

Align compatibility guidance with released-artifact validation.

JIRA: DATAFU-182
@InbalHoni

Copy link
Copy Markdown
Contributor Author

Thanks for the detailed validation and review.

I did test some versions locally, but I couldn't remember if I tested all of them, so I repeated the released-artifact test using the published datafu-spark_2.12:2.1.0 JAR against Spark 3.5.0 through 3.5.8 on Java 8. All 30 tests passed for every version. Together with your Spark 3.5.9 result, this covers Spark 3.5.0 through 3.5.9.

I also pushed the requested documentation updates:

  • Extended the DataFu 2.1.0 compatibility range to 3.0.x - 3.5.x
  • Updated both Spark site documentation pages
  • Added DATAFU-182 to changes.md

@InbalHoni

Copy link
Copy Markdown
Contributor Author

@uzadude @eyala I also opened DATAFU-187 to trackthe proposed permanent released JAR binary compatibility CI coverage.

@eyala

eyala commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

Thank you @InbalHoni ! I will take one last look and then merge this, since I think all the issues have been addressed. The changes in the documentation in the site directory require a rebuild of our static website - I'll get to that as soon as I can, but it's not a blocker for this PR.

If you're up for it, feel free to work on DATAFU-187 yourself.

@eyala
eyala merged commit 7b30dce into apache:main Oct 8, 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.

3 participants