Skip to content

[build] Improve finding Spark-compatible Java version#22643

Open
vepadulano wants to merge 1 commit into
root-project:masterfrom
vepadulano:build-check-spark-compatible-java-version
Open

[build] Improve finding Spark-compatible Java version#22643
vepadulano wants to merge 1 commit into
root-project:masterfrom
vepadulano:build-check-spark-compatible-java-version

Conversation

@vepadulano

Copy link
Copy Markdown
Member

Different Spark versions support different versions of Java. The latest versions of Spark support current LTS Java versions 17 and 21. In any case, there is no Spark version that supports a Java version greater than 21. Thus, we should check in CMake that the environment-installed Java version is in a reasonable range. Since the CMake FindJava module does not support version ranges, we introduce an extra check with an error in case a too recent version of Java is detected.

This would help fail early on CI nodes where an incompatible Java version is installed.

Different Spark versions support different versions of Java. The latest versions
of Spark support current LTS Java versions 17 and 21. In any case, there is no
Spark version that supports a Java version greater than 21. Thus, we should
check in CMake that the environment-installed Java version is in a reasonable
range. Since the CMake FindJava module does not support version ranges, we
introduce an extra check with an error in case a too recent version of Java is
detected.

This would help fail early on CI nodes where an incompatible Java version is
installed.
@vepadulano vepadulano force-pushed the build-check-spark-compatible-java-version branch from 3be7728 to c202c63 Compare June 17, 2026 12:28

@guitargeek guitargeek left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! This has confused me in the past, so I appreciate the fix.

@github-actions

github-actions Bot commented Jun 17, 2026

Copy link
Copy Markdown

Test Results

    22 files      22 suites   3d 13h 54m 46s ⏱️
 3 869 tests  3 868 ✅ 0 💤 1 ❌
77 329 runs  77 328 ✅ 0 💤 1 ❌

For more details on these failures, see this check.

Results for commit c202c63.

♻️ This comment has been updated with latest results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants