Skip to content

Revert java 17 compiler#18831

Merged
cecemei merged 4 commits intoapache:masterfrom
cecemei:revert-17
Dec 12, 2025
Merged

Revert java 17 compiler#18831
cecemei merged 4 commits intoapache:masterfrom
cecemei:revert-17

Conversation

@cecemei
Copy link
Copy Markdown
Contributor

@cecemei cecemei commented Dec 10, 2025

Description

  • revert back to java 11 compiler for hadoop compatibility in root pom
  • in embedded-test module, force use java 17 to support the multi-line string syntax, and exclude it from strict compilation.

This PR has:

  • been self-reviewed.
  • added documentation for new or modified features or behaviors.
  • a release note entry in the PR description.
  • added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
  • added or updated version, license, or notice information in licenses.yaml
  • added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
  • added unit tests or modified existing tests to cover new code paths, ensuring the threshold for code coverage is met.
  • added integration tests.
  • been tested in a test Druid cluster.

@cecemei cecemei marked this pull request as ready for review December 10, 2025 20:31
@github-actions github-actions Bot added the GHA label Dec 10, 2025
Comment thread embedded-tests/pom.xml

<properties>
<surefire.rerunFailingTestsCount>0</surefire.rerunFailingTestsCount>
<maven.compiler.release>17</maven.compiler.release>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why is this needed? seems worth 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.

Maybe:

Using JDK 11 language level restriction until Druid 37 which (as of 2025-12-10) is the current target for removing Hadoop support from the dev list threads. Hadoop relies upon JDK 8/11 language level which breaks when upgraded to anything higher.

from: #18759 (comment)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks all, I added some explanation.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

we will also need to remember to remove the changes here and in static-checks.yml in the future, not sure how to best manage that debt, i guess we could put a note in the root pom.xml...

imo we should try to avoid diverging like this in any other modules and try to stay consistent with the root pom unless there is a seriously good reason so that we don't have to keep track of stuff like this.

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.

I think we may fix it up in this patch itself. The only requirement for 17 (AFAIK) is the doc-style strings added in a recent test NestedDataFormatsTest. For the time being, we can just stick to regular strings.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

update the root pom to include things to check for upgrade to 17.

imo using 17 in embedded-test is safe and multi-line string syntax helps with readability a lot, so hopefully we dont let this java 11 thing drag up back.

@jtuglu1
Copy link
Copy Markdown
Contributor

jtuglu1 commented Dec 12, 2025

@cecemei good to merge?

@cecemei cecemei merged commit 422d732 into apache:master Dec 12, 2025
55 checks passed
@kgyrtkirk kgyrtkirk added this to the 36.0.0 milestone Jan 19, 2026
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.

5 participants