[GH-2509] Refactor the example projects to include better examples #2510
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.
Did you read the Contributor Guide?
Is this PR related to a ticket?
[GH-XXX] my subject. Closes Update the example projects to include more examples #2509What changes were proposed in this PR?
This pull request updates the Flink and Java Spark SQL example projects by modernizing dependencies, improving test coverage, cleaning up code, and enhancing build and CI configurations. Key changes include upgrading Spark and Sedona, refactoring the Flink example and utilities, adding Flink unit tests, and tightening Maven and CI setups.
Dependency and Configuration Updates
• Upgraded Spark, Sedona, Scala, and JUnit in the Java Spark SQL example and added Java 17+ compatibility settings.
• Switched dependency artifacts to use variables for better compatibility.
Flink Refactoring
• Cleaned up FlinkExample.java and Utils.java for clearer structure and extracted core logic into a testable method.
Testing
• Added FlinkFunctionsTest.java to validate S2 spatial joins across dataset sizes.
Build and Formatting
• Set Flink dependencies to provided and added Spotless and Surefire plugins for formatting and test execution.
CI Workflow
• Updated the example workflow to use mvn test, removed unused Java options, improved job naming, and split testing for Java, Scala, and Flink examples.
How was this patch tested?
Did this PR include necessary documentation updates?