[902] Move the build to Spark 3.5 and Delta 3.3 - #908
Closed
slachiewicz wants to merge 3 commits into
Closed
Conversation
Hudi stamps its timeline in UTC, so on a JVM in any other zone the compaction planner reads the table's own delta commits as not yet completed, drops every log file from the plan and hands back an empty Option that TestAbstractHudiTable.onlyScheduleCompaction calls get() on. CI runs UTC and never saw it.
Delta renamed delta-core to delta-spark in 3.0 and moved four call sites with it: AddFile gained baseRowId, defaultRowCommitVersion and clusteringProvider, getSnapshotAt takes a catalog table, and ensureLogDirectoryExist is now createLogDirectoriesIfNotExists. Scala stays on 2.12 and the compiler target stays Java 8, since delta-spark 3.3.3 is still class-file 52. This isolates the Delta jump from the Scala 2.13 and Java 17 flip in apache#902.
As of Delta 3.x a merge planned against a DeltaTable handle resolved before the ALTER TABLE does not see deletion vectors as readable, so the row_index metadata column that the DV write path needs is never exposed and the merge fails to analyse.
This was referenced Aug 23, 2026
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.
Part of #902, which folds the skipped Spark 3.5 step into the Spark 4.0 work. This is that step on its own: Spark 3.5 and Delta 3.3 with Scala still on 2.12 and the compiler target still Java 8, so the Delta 2.4 to 3.x jump can be reviewed apart from the Scala 2.13 and Java 17 flip that follows.
The branch is rebased onto #912, which carries Delta's nested field ids into the converted schema, and holds five commits of its own. It no longer carries the commits it once borrowed: #910 has merged, and #912's commit is now its base.
What is the purpose of the pull request
Moves the build to
spark.version3.5.9 anddelta.version3.3.3, and ports the Delta call sites that 3.x moved. Hudi 1.2.0, Iceberg 1.9.2 and Paimon 1.3.1 all publish their 3.5 variants, so no engine version changes.delta-spark_2.12:3.3.3is still class-file 52, so Java 8 remains a valid target and CI stays on JDK 11.Brief change log
io.delta:delta-core_toio.delta:delta-spark_, which Delta did in 3.0, across the four consuming modules, thextable-utilitiesshade include, the demo dependency scripts and two docs snippets that still named Delta 2.x.AddFilegainedbaseRowId,defaultRowCommitVersionandclusteringProvider, so its constructor takes 11 arguments; the sync leaves all three unset.DeltaLog.getSnapshotAtnow takes a catalog table, andensureLogDirectoryExistiscreateLogDirectoriesIfNotExists.Verify this pull request
Three test level consequences of the Delta jump, each in its own commit:
reuseMetadataDisabledReconstructsSnapshotPerCommitno longer asserts thatgetChangeLogFilesgoes uncalled. As of Delta 3.xDeltaLog.getChangesdelegates to it, so the spy cannot tell that call apart from oneDeltaIncrementalChangesStatemakes. The snapshot per commit assertion it shares the test with is unchanged.ITDeltaDeleteVectorConvertreloads its table handle after enabling deletion vectors, since Delta 3.x plans a merge against the snapshot the handle was resolved on and exposes therow_indexmetadata column only where deletion vectors are readable (DeltaParquetFileFormat.scala:255-262), and it keeps its upserts on the rewrite path, since Delta 3.x persists deletion vectors forMERGEas well asDELETE.TestDeltaHelperenables IcebergCompatV2. Delta 3.x writes parquet field ids for top level columns but assigns none to a map key, a map value or a list element, and Iceberg reads a file carrying any id by id alone, so without it those children cannot be resolved. Delta to Iceberg conversion loses the field ids of map and list children under column mapping #911 and [911] Carry Delta's nested field ids into the converted schema #912 cover that, and this branch is where the fix is exercised end to end, byITConversionController#testColumnMappingEnabledDeltaToIceberg.ITConversionController#testColumnMappingWithoutIcebergCompatIsNotReadableAsIcebergpins the case that carrying ids cannot fix. It builds a column mapped table without IcebergCompatV2, syncs it to Iceberg, asserts the sync reports SUCCESS, and asserts that reading the result throws. That is the current behaviour rather than the desired one, so if the project would rather refuse the sync or warn at sync time, that test is the place that changes. #911 has the protocol detail behind it.Verification, on JDK 11 with the Maven wrapper:
./mvnw -pl xtable-core -am -DskipITs testruns 495 unit tests, all green.ITConversionController,ITDeltaConversionSource,ITDeltaDeleteVectorConvertandITHudiConversionSource. They have not been re-run since the rebase.Nine further errors seen locally before #910 merged, all
NoSuchElementException: No value present in OptionfromscheduleCompactionon MERGE_ON_READ tables, were an artefact of a non-UTC developer machine rather than of this change. #909 has the root cause and #910 the fix, now in main.This change was created with AI assistance.