[SPARK-53753][BUILD][SQL] shade antlr4-runtime #52490
Open
+157
−63
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Shade org.antlr:antlr4-runtime.
Why are the changes needed?
antlr4-runtime library 4.10+ is not semver compatible with 4.9: "Mixing ANTLR 4.9.3 and 4.10 can lead to errors that point to a version mismatch. A very common Java error looks like this:
Caused by: java.io.InvalidClassException: org.antlr.v4.runtime.atn.ATN; Could not deserialize ATN with version 3 (expected 4).
". As ANTLR 4 is a commonly used library (for example it is used by Hive 3.x and 4.x) and many others 3rd party libraries , shadingantlr4-runtime
allows to avoid such conflicts.Does this PR introduce any user-facing change?
Yes,
antlr4-runtime-4.13.1.jar
will be removed from Spark binary distribution. Applications that rely on ANTLR 4 will need to provide their own version.How was this patch tested?
Using existing tests
Was this patch authored or co-authored using generative AI tooling?
No