Repository navigation
Conversation
… Spark 4.1 profile Iceberg 1.11 and later are compiled for Java 17, and Iceberg 1.12 publishes no Spark 3.4 runtime, so the default build moves to Java 17, Spark 3.5.9, Iceberg 1.12.0 and delta-spark 3.3.2. The test JVMs get the module opens that Spark and Hadoop need on Java 17, and the workflows build on JDK 17. Delta 3 and Delta 4 changed the signatures of a few DeltaLog calls. DeltaSparkShim holds those calls once per Delta major version, under src/main/delta3 and src/main/delta4, and the build adds the one that delta.shim.dir names. The AddFile constructor and the log directory call are the same in both, so the code calls them directly. The spark3.5 profile names the default explicitly. The spark4.1 profile builds on Spark 4.1.1 with Scala 2.13, Delta 4.1.0 and Paimon's Spark 4.0 module, and pins the Netty, Parquet and ORC versions Spark 4.1 is built with. Under it, two Delta test classes that use APIs Delta 4 and Scala 2.13 removed are left out of the test compile. Spark sessions in the tests stop with stop(), since close() declares an IOException in Spark 4. The Iceberg time travel in ITIcebergTableFormat uses Spark's timestampAsOf option, which Iceberg's Spark 4 reader keeps. HudiTableExtractor drops an unused @singleton, since javax.inject is not on the Spark 4.1 classpath. The README, setup docs, AGENTS.md and the Jupyter demo move to Java 17 and delta-spark. The shaded xtable-utilities jar includes the Spark 3.5 modules spark-common-utils, spark-sql-api and datasketches, and the spark-runtime validation drops its Spark 3.4 leg, since the bundle now calls Delta 3 APIs that delta-core 2.4 lacks. The bundled license metadata of xtable-hudi-support-extensions is regenerated for iceberg-parquet 1.12.0. ITDeltaConversionSource counts the log listings XTable makes against the getChanges calls, since Delta 3's getChanges lists the log through getChangeLogFiles itself. The column mapping tables of the Delta test helper enable IcebergCompatV2, since Delta 3 writes Parquet field ids for the key, value and element of maps and lists only under it, and Iceberg reads a file that has field ids by id. Two Delta tests follow Delta 3 behavior: ITDeltaDeleteVectorConvert reloads its DeltaTable handle after enabling deletion vectors, since the handle keeps the file format of the snapshot before the feature, and expects the deletion vectors that Delta 3's MERGE writes by default. testLateColumnMappingRenameDeltaToIceberg enables IcebergCompatV2 after its partition renames, which IcebergCompatV2 forbids. xtable-core runs at most four test cases at once: with one per core, the concurrent cases of ITConversionController outgrow the 1.5 GB test heap on Spark 3.5 on a machine with many cores.
…t support HoodieAvroWriteSupportWithFieldIds applied its field ids through Iceberg's ParquetSchemaUtil.applyNameMapping. Iceberg 1.10 and later build their Parquet support against Parquet 1.16 or later and call LogicalTypeAnnotation.variantType, which the Parquet of Spark 3.5 and of Hudi's Spark 3.5 bundle lacks, so every write with this write support failed with a NoSuchMethodError, as ITRunSync in xtable-utilities showed. Moving the build to a newer Parquet instead breaks Spark jobs that load Hudi's bundle, which carries an older copy of Parquet's shaded fastutil. The write support now sets the ids itself over Parquet's own schema classes, matching fields by name at each level, the element of a list as element in both list layouts and the entries of a map as key and value, as Iceberg's name mapping does. iceberg-parquet leaves the extensions module and its bundle, and the bundled license metadata follows. A new test checks the ids for flat, nested, list and map schemas; run once against Iceberg's applyNameMapping on Parquet 1.17.1, it gave the same schemas for every case.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Important Read
Part of #902: the Java 17 and Spark 3.5 steps, with Spark 4.1 as a profile rather than the default.
What is the purpose of the pull request
Moves the default build to Java 17, Spark 3.5.9, Iceberg 1.12.0 and delta-spark 3.3.2, adds a
spark4.1profile, and keeps an explicitspark3.5profile. Iceberg 1.11 and later need Java 17, and Iceberg 1.12 publishes no Spark 3.4 runtime, so the Spark 3.5 default comes with the Iceberg upgrade. Hudi stays at 1.2.1.Brief change log
DeltaSparkShim, undersrc/main/delta3andsrc/main/delta4, holds the fewDeltaLogcalls whose signatures differ between Delta 3 and 4; the build adds the onedelta.shim.dirnames.spark4.1profile (Scala 2.13, Delta 4.1, Paimon's Spark 4.0 module, and the Netty, Parquet and ORC versions Spark 4.1 is built with).xtable-utilitiesshades the modules Spark 3.5 adds.stop(), the Iceberg time travel IT usestimestampAsOf,ITDeltaConversionSourcecounts log listings againstgetChanges, and the Delta tests follow Delta 3: column-mapping tables enable IcebergCompatV2, andITDeltaDeleteVectorConvertreloads its table handle and expects the deletion vectors Delta 3's MERGE writes.HoodieAvroWriteSupportWithFieldIdsin the Hudi extensions sets Parquet field ids over Parquet's own schema classes instead of Iceberg'sParquetSchemaUtil: Iceberg 1.10 and later call a Parquet 1.16 method that the Parquet of Spark 3.5 and Hudi's Spark 3.5 bundle lacks, and a newer Parquet breaks Hudi's bundle.iceberg-parquetleaves the extensions bundle.xtable-coreruns at most four test cases at once; with one per core, the concurrent cases ofITConversionControlleroutgrew the 1.5 GB test heap on Spark 3.5.Known limitations:
xtable-spark-runtimeon Spark 3.4 with delta-core 2.4 can no longer use the Delta (non-Kernel) source, since the shim calls Delta 3 APIs; the Spark 3.4 leg of the runtime validation is dropped.spark4.1buildsxtable-coreand the Iceberg table format only, leavesITDeltaConversionSourceandTestDeltaSyncout of its test compile, and has no CI job.Verify this pull request
This pull request is already covered by existing tests, run locally:
xtable-coreunit tests (3 skipped), all 226xtable-coreITs, the Iceberg table format's 26 unit tests and 46 ITs (1 skipped), and the extensions, Spark extensions, AWS, HMS, utilities (includingITRunSync) and service tests.ITXTableSparkRuntimeBundlepasses with a Spark 3.5.9 distribution asSPARK_HOME.TestHoodieAvroWriteSupportWithFieldIdscovers the field ids for flat, nested, list and map schemas; run once against Iceberg'sapplyNameMappingon Parquet 1.17.1, it gave the same schemas for every case.-DskipTests;-Pspark4.1buildsxtable-coreand the Iceberg table format with their tests.spotless:check,apache-rat:checkandrelease/scripts/validate_shaded_license_coverage.shpass.