Repository navigation
[AMORO-4386][Optimizer] Support Spark 4.1 for Iceberg optimizer - #4392
sivakumar-mahalingam wants to merge 5 commits into
Conversation
…gService The AMS instance is shared across test classes, so a leftover test_ns made TestDatabaseOperation fail its isEmpty() check and every nested @beforeeach fail with AlreadyExists. Drop residual tables/database before each test and assert on test_ns presence instead of an empty catalog. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Hi @j1wonpark @zhoujinsong, this PR adds Spark 4.1 support for the Iceberg optimizer (#4386) and is ready for review. Could you please take a look when you get a chance? Thanks! |
|
Thanks for fixing the AMS test failures. These fixes also address the CI failures in #4378, and I’d like to review them independently. Could you please extract the AMS test fixes into a separate PR? |
|
Sure, I extract it to a separate pr and update to you in this thread. |
|
Hi @j1wonpark @zhoujinsong, Could you please review the pr when you get a chance? Thanks! |
| major: "4.1" | ||
| jdk: "17" | ||
| profile: "optimizer-spark-4.1" | ||
| aws: "2.29.52" |
There was a problem hiding this comment.
Could we standardize on AWS SDK 2.29.52. And verify compatibility with Spark 3.5 and the other affected components.
|
|
||
| // Preserve standalone execution without loading DerbyPersistence when the shared AMS test | ||
| // environment has already initialized persistence. Loading it would truncate the shared DB. | ||
| @SuppressWarnings("unused") |
There was a problem hiding this comment.
Are these fixes releated to optimizer spark 4.1?
Why are the changes needed?
The external Spark optimizer currently follows Amoro's global Spark and Scala versions. This prevents the optimizer from running with Spark 4.1 images because Spark 4.1 uses Scala 2.13 and requires a newer Java and dependency baseline.
This pull request adds Spark 4.1 support specifically for the external Spark optimizer used with native Iceberg tables. It does not enable general Spark 4.1 support for AMS, mixed-format Spark modules, or Paimon.
Closes #4386.
Brief change log
optimizer-spark-4.1Maven profile targeting Spark 4.1.3, Scala 2.13, and JDK 17.amoro-optimizer-spark-4.1_2.13artifact.How was this patch tested?
Add some test cases that check the changes thoroughly including negative and positive cases if possible
Add screenshots for manual tests if appropriate
Run test locally before making a pull request
Test Execution
Spark 4.1.3 optimizer tests on JDK 17:
Result:
Spark 3.5.8 regression tests on JDK 11:
Result:
Native-Iceberg physical rewrite regression suite on JDK 17 with the Spark 4.1 optimizer profile:
Result:
Additional validation:
apache/spark:4.1.3base image.SparkOptimizerentry point through Spark 4.1.3 local mode. It initialized and reached AMS registration; registration then failed as expected because no AMS instance was running.SparkOptimizerExecutorandIcebergRewriteExecutorFactory. Two Parquet input files were rewritten into one output file containing both records.git diff --check.A full
clean verifywas attempted but stopped during Apache RAT validation because of the existing tracked test fixture:Targeted Spark optimizer and native-Iceberg test suites completed successfully.
Documentation