You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xtable.apache.org by vi...@apache.org on 2026/10/05 19:48:06 UTC

(incubator-xtable) branch main updated: [834] Add Hudi table version 9 support to the Hudi target and source (#835)

This is an automated email from the ASF dual-hosted git repository.

vinishjail97 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-xtable.git


The following commit(s) were added to refs/heads/main by this push:
     new 4e618832 [834] Add Hudi table version 9 support to the Hudi target and source (#835)
4e618832 is described below

commit 4e618832423b20ff1fe3533a973cc5957e2e39d4
Author: Vinish Reddy <vi...@apache.org>
AuthorDate: Tue Oct 6 01:18:01 2026 +0530

    [834] Add Hudi table version 9 support to the Hudi target and source (#835)
    
    * [834] Add Hudi table version 9 (Hudi 1.x) support to the Hudi target
    
    Adds an `xtable.hudi.target.table_version` config (values 6 or 9, default 9)
    so the Hudi target can write the Hudi 1.x table format (timeline layout V2,
    column-stats index V2) instead of being pinned to version 6.
    
    Target changes:
    - HudiTargetConfig parses the new config from the target's additional
      properties; HudiTableManager.initializeHudiTable and the write config now
      honour the selected version (write version derives from the table itself).
    - Enable the column-stats index for all tables and disable the partition-stats
      index independently (hoodie.metadata.index.partition.stats.enable, added in
      apache/hudi#19111) so column stats work for partitioned external-file tables.
    - Select the timeline archiver by layout version (TimelineArchivers.getInstance)
      so version 9 uses the V2/LSM archiver; switch to the HoodieCleanStat builder.
    
    Source changes:
    - HudiConversionSource selects and orders instants by completion time on
      version 9 (timeline layout V2) and by requested time on version 6, so a
      commit that completes out of order relative to its requested time is no
      longer skipped during incremental sync.
    
    Tests:
    - Bump hudi.version to 1.3.0-SNAPSHOT to pick up apache/hudi#19111.
    - Parameterize TestHudiFileStatsExtractor over versions 6 (8 columns, decimal
      excluded) and 9 (9 columns, decimal present).
    - Add TestHudiTargetConfig and an out-of-order-completion incremental sync test
      on a version 9 source table.
    
    * [834] Assert column stats for partitioned tables in ITHudiConversionTarget
    
    Column stats are now generated for partitioned Hudi targets (column-stats
    index enabled, partition-stats index disabled independently), so drop the
    `if (!partitioned)` guards that previously skipped the column-stats
    assertions for partitioned tables. The partitioned/non-partitioned
    parameterization is unchanged; the col-stats checks now run for both.
    
    * [834] Drop stale array/map column-stats comment in TestAbstractHudiTable
    
    Source test tables already enable the column-stats index unconditionally and
    the suite passes with array/map schemas, so remove the leftover commented-out
    schemaContainsArrayOrMap guard and its stale #773 note.
    
    * [834] Re-enable Paimon and nested-partition conversions to Hudi at table version 9
    
    Re-enables the three conversion cases #772 disabled for the Hudi 1.x target:
    
    - Un-partitioned Paimon -> Hudi (ITConversionController and ITConversionService).
      BaseFileUpdatesExtractor now emits Hudi's external file-group-prefix format
      (Hudi PR #17788) for bucketed files instead of folding the "bucket-N" directory
      into the partition path: the file is registered under its true partition (empty
      for un-partitioned) with fileId "bucket-N/<file>" and the 3-arg marker
      "<file>_<commit>_fg%3Dbucket-N_hudiext". Applied consistently across the snapshot
      path, the diff path, and file-id derivation; non-bucketed sources are unaffected.
    
    - HUDI (partitioned on the nested column "nested_record.level") -> ICEBERG. This
      depends on the Hudi reader fix in apache/hudi#19123, so it will only pass once
      that fix is available in the Hudi snapshot the build resolves.
    
    * Keep savepoint instants in the version 9 incremental backlog
    
    A savepoint instant reuses the requested time of the commit it pins, so
    orderByCompletionTimeAndDedup (the table version 9 / completion-time
    ordering path) dropped it when deduping the merged commit lists by
    requested time alone: putIfAbsent kept the data commit and silently
    discarded the savepoint. The version 6 path (mergeAndDedupLists) dedups
    by full instant equality, which includes the action, so it never had
    this problem.
    
    Include the action in the dedup key. The intended dedup (the same
    instant appearing in both the pending list and the newly-completed
    list) still collapses, but distinct actions sharing a requested time
    survive, and the version 9 backlog matches version 6:
    commit, savepoint (no-op), restore, commit.
    
    * Apply spotless formatting
    
    * Default the Hudi target to table version 6 and parameterize tests for versions 6 and 9
    
    Flip HudiTargetConfig.DEFAULT_TABLE_VERSION from NINE to SIX so the
    default output stays readable by released Hudi readers; version 9
    remains fully supported via xtable.hudi.target.table_version=9.
    
    Parameterize the Hudi test suites so every run exercises both table
    versions instead of only the default:
    - ITHudiConversionTarget: partitioned x {SIX, NINE} via a MethodSource
      cross-product; the target client sets the version through
      HudiTargetConfig.HUDI_TABLE_VERSION.
    - ITHudiConversionSource: source tables are created at {SIX, NINE} via
      the table-type/partition MethodSource cross-products, and the
      parameterized tests write through TestSparkHudiTable (Spark writer)
      instead of the Java client.
    - ITConversionController: combinations targeting HUDI are emitted once
      per version; getTableSyncConfig gained an overload that applies the
      version to the Hudi target properties.
    - TestHudiTargetConfig/TestHudiConversionTarget assert against
      DEFAULT_TABLE_VERSION instead of a hard-coded version.
    
    Version 9 source coverage in ITHudiConversionSource depends on two
    Hudi fixes validated against a locally patched 1.3.0-SNAPSHOT:
    apache/hudi#19126 (column stats on map/array-nested leaves during MOR
    log-append) and the savepoint backlog fix in the previous commit.
    
    * [834] Follow Hudi's hudi-common package reorganization
    
    Hudi master moved two packages that XTable depends on, in the
    refactor(common) commits apache/hudi#19193 and apache/hudi#19195:
    
    - org.apache.hudi.stats -> org.apache.hudi.metadata.stats, covering
      ValueMetadata, ValueType and HoodieColumnRangeMetadata. XTable's
      XTableValueMetadata and its test live inside Hudi's package to reach
      package-private members, so the files move directories as well.
    - org.apache.hudi.avro.HoodieAvroUtils -> org.apache.hudi.common.avro.
      HoodieAvroUtils. The generated org.apache.hudi.avro.model classes did
      not move.
    
    This is required to build against a Hudi release that carries the
    reorganization, alongside the hudi.version bump this branch already
    makes.
    
    * Revert "[834] Follow Hudi's hudi-common package reorganization"
    
    This reverts commit 5aca977ab4e5971501d920e449fa2b57d7f0239e.
    
    * [834] Build against the released Hudi 1.2.1
    
    * [834] Correct the column-stats comments in the Hudi target and test helper
    
    * [834] Create the existing table at the tested version in ITHudiConversionTarget
    
    syncForExistingTable set up its existing table at version 6 for every case,
    so the version 9 case synced into a version 6 table and never covered an
    existing version 9 table. HudiTestUtil now takes the table version, and its
    write config writes at the table's own version like HudiConversionTarget.
    The test also asserts the sync keeps the table at its version.
    
    HudiTestUtil also drops the leftover #772 workaround that built the
    column-stats index only for un-partitioned tables, and now mirrors
    HudiConversionTarget: column stats for all tables, partition stats off.
    
    * [834] Address review feedback
    
    - Use the completion time as the sync checkpoint for table version 9 sources, so a
      lagging target does not make an up-to-date target apply a commit again
    - Treat a bucket-N directory as a file-group prefix only for a Paimon source
    - Add ConversionTarget#isIncrementalSyncSafe; the Hudi target requires one snapshot
      sync when a Paimon target still has file groups under bucket-N partitions
    - Warn when an existing Hudi target table version differs from the configured one
    - Reject non-numeric and unknown table versions with IllegalArgumentException
    - Add v9 source cases to ITConversionController and run the cleaner and
      upserts-after-inserts source tests on table versions 6 and 9
    
    * [834] Stub the table version in the TestHudiConversionSource mocks
    
    * [834] Address review feedback
    
    - Add an optional fileGroupPrefix to InternalDataFile; the Paimon source sets it to bucket-N,
      so the Hudi target no longer infers the prefix from directory names
    - Remove the automatic snapshot fallback for Paimon targets written by XTable 0.4.0; an
      incremental sync now fails with a message to run one FULL sync
    - Order the Hudi source backlog with the timeline layout's instant comparator in one merge method
    - Cover the file-group prefix in TestBaseFileUpdatesExtractor and the Paimon extractor, and run
      the TestHudiConversionSource cleaner tests on table versions 6 and 9
    
    * [834] Address review feedback
    
    * [834] Address review feedback
    
    * [834] Address review feedback
---
 pom.xml                                            |   2 +-
 .../xtable/model/storage/InternalDataFile.java     |   4 +
 .../xtable/hudi/BaseFileUpdatesExtractor.java      |  62 +++++-
 .../apache/xtable/hudi/HudiConversionSource.java   | 211 +++++++++++++------
 .../apache/xtable/hudi/HudiConversionTarget.java   | 146 ++++++++++---
 .../org/apache/xtable/hudi/HudiInstantUtils.java   |  27 +++
 .../org/apache/xtable/hudi/HudiTableExtractor.java |   2 +-
 .../org/apache/xtable/hudi/HudiTableManager.java   |  12 +-
 .../org/apache/xtable/hudi/HudiTargetConfig.java   |  72 +++++++
 .../xtable/paimon/PaimonDataFileExtractor.java     |   7 +-
 .../org/apache/xtable/ITConversionController.java  | 226 +++++++++++++++++----
 .../org/apache/xtable/TestAbstractHudiTable.java   |  22 +-
 .../java/org/apache/xtable/TestJavaHudiTable.java  |  58 ++++++
 .../java/org/apache/xtable/TestSparkHudiTable.java |  25 +++
 .../java/org/apache/xtable/hudi/HudiTestUtil.java  |  24 ++-
 .../apache/xtable/hudi/ITHudiConversionSource.java | 212 +++++++++++++++----
 .../apache/xtable/hudi/ITHudiConversionTarget.java | 162 ++++++++-------
 .../xtable/hudi/TestBaseFileUpdatesExtractor.java  |  68 +++++++
 .../xtable/hudi/TestHudiConversionSource.java      |  46 ++++-
 .../xtable/hudi/TestHudiConversionTarget.java      | 102 +++++++++-
 .../xtable/hudi/TestHudiFileStatsExtractor.java    |  23 ++-
 .../apache/xtable/hudi/TestHudiTableManager.java   |   5 +-
 .../apache/xtable/hudi/TestHudiTargetConfig.java   |  72 +++++++
 .../xtable/paimon/TestPaimonDataFileExtractor.java |   6 +
 .../apache/xtable/service/ITConversionService.java |   6 -
 25 files changed, 1308 insertions(+), 294 deletions(-)

diff --git a/pom.xml b/pom.xml
index ee3676ce..d9ea06bf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -70,7 +70,7 @@
         <lombok.version>1.18.46</lombok.version>
         <lombok-maven-plugin.version>1.18.20.0</lombok-maven-plugin.version>
         <hadoop.version>3.4.1</hadoop.version>
-        <hudi.version>1.2.0</hudi.version>
+        <hudi.version>1.2.1</hudi.version>
         <aws.version>2.29.40</aws.version>
         <hive.version>3.1.3</hive.version>
         <maven-source-plugin.version>3.3.1</maven-source-plugin.version>
diff --git a/xtable-api/src/main/java/org/apache/xtable/model/storage/InternalDataFile.java b/xtable-api/src/main/java/org/apache/xtable/model/storage/InternalDataFile.java
index 0dcb7359..a29b1a60 100644
--- a/xtable-api/src/main/java/org/apache/xtable/model/storage/InternalDataFile.java
+++ b/xtable-api/src/main/java/org/apache/xtable/model/storage/InternalDataFile.java
@@ -20,6 +20,7 @@ package org.apache.xtable.model.storage;
 
 import java.util.Collections;
 import java.util.List;
+import java.util.Optional;
 
 import lombok.Builder;
 import lombok.EqualsAndHashCode;
@@ -52,4 +53,7 @@ public class InternalDataFile extends InternalFile {
   @Builder.Default @NonNull List<ColumnStat> columnStats = Collections.emptyList();
   // last modified time in millis since epoch
   long lastModified;
+  // directory between the partition path and the file name that groups files within a partition,
+  // for example Paimon's bucket-N; empty when the file sits directly under its partition
+  @Builder.Default @NonNull Optional<String> partitionSubdirectory = Optional.empty();
 }
diff --git a/xtable-core/src/main/java/org/apache/xtable/hudi/BaseFileUpdatesExtractor.java b/xtable-core/src/main/java/org/apache/xtable/hudi/BaseFileUpdatesExtractor.java
index aa55b8c0..349b8daa 100644
--- a/xtable-core/src/main/java/org/apache/xtable/hudi/BaseFileUpdatesExtractor.java
+++ b/xtable-core/src/main/java/org/apache/xtable/hudi/BaseFileUpdatesExtractor.java
@@ -61,6 +61,8 @@ import org.apache.hudi.stats.HoodieColumnRangeMetadata;
 import org.apache.hudi.stats.ValueMetadata;
 import org.apache.hudi.stats.XTableValueMetadata;
 
+import com.google.common.base.Preconditions;
+
 import org.apache.xtable.collectors.CustomCollectors;
 import org.apache.xtable.exception.ReadException;
 import org.apache.xtable.model.schema.InternalType;
@@ -231,10 +233,9 @@ public class BaseFileUpdatesExtractor {
     // For all removed files, group by partition and extract the file id
     Map<String, List<String>> partitionToReplacedFileIds =
         internalFilesDiff.dataFilesRemoved().stream()
-            .map(file -> new CachingPath(file.getPhysicalPath()))
             .collect(
                 Collectors.groupingBy(
-                    path -> HudiPathUtils.getPartitionPath(tableBasePath, path),
+                    file -> getHudiPartitionPath(tableBasePath, file),
                     Collectors.mapping(this::getFileId, Collectors.toList())));
     // For all added files, group by partition and extract the file id
     List<WriteStatus> writeStatuses =
@@ -244,13 +245,38 @@ public class BaseFileUpdatesExtractor {
     return ReplaceMetadata.of(partitionToReplacedFileIds, writeStatuses);
   }
 
-  private String getFileId(Path filePath) {
-    String fileName = filePath.getName();
+  private String getFileId(InternalDataFile file) {
+    String fileName = new CachingPath(file.getPhysicalPath()).getName();
     // if file was created by Hudi use original fileId, otherwise use the file name as IDs
     if (isFileCreatedByHudiWriter(fileName)) {
       return FSUtils.getFileId(fileName);
     }
-    return fileName;
+    // Files under a partition subdirectory keep it as part of the fileId so the subdirectory can be
+    // recovered when Hudi resolves the physical path of the externally created file.
+    return file.getPartitionSubdirectory().map(prefix -> prefix + "/" + fileName).orElse(fileName);
+  }
+
+  /**
+   * Resolves the Hudi partition path for a file. A partition subdirectory (e.g. Paimon's {@code
+   * bucket-N}) is a file group within the partition (see Hudi PR #17788), so it is stripped from
+   * the partition path.
+   */
+  private String getHudiPartitionPath(Path tableBasePath, InternalDataFile file) {
+    String partitionPath =
+        HudiPathUtils.getPartitionPath(tableBasePath, new CachingPath(file.getPhysicalPath()));
+    return file.getPartitionSubdirectory()
+        .map(
+            prefix -> {
+              Preconditions.checkArgument(
+                  partitionPath.endsWith(prefix),
+                  "File %s is not under its partition subdirectory %s",
+                  file.getPhysicalPath(),
+                  prefix);
+              return prefix.equals(partitionPath)
+                  ? ""
+                  : partitionPath.substring(0, partitionPath.length() - prefix.length() - 1);
+            })
+        .orElse(partitionPath);
   }
 
   /**
@@ -273,17 +299,32 @@ public class BaseFileUpdatesExtractor {
     WriteStatus writeStatus = new WriteStatus();
     Path path = new CachingPath(file.getPhysicalPath());
     String partitionPath =
-        partitionPathOptional.orElseGet(() -> HudiPathUtils.getPartitionPath(tableBasePath, path));
-    String fileId = getFileId(path);
+        partitionPathOptional.orElseGet(() -> getHudiPartitionPath(tableBasePath, file));
+    String fileId = getFileId(file);
     String filePath =
         path.toUri().getPath().substring(tableBasePath.toUri().getPath().length() + 1);
     String fileName = path.getName();
+    Optional<String> partitionSubdirectory = file.getPartitionSubdirectory();
+    // For files under a partition subdirectory, encode it as the file-group prefix in the marker
+    // and keep the file name (not the bucket-relative path) as the marked name. Otherwise, fall
+    // back to the plain marker on the full relative path. In both cases the directory portion is
+    // preserved as-is.
+    String markedPath =
+        partitionSubdirectory
+            .map(
+                prefix ->
+                    filePath.substring(0, filePath.length() - fileName.length())
+                        + ExternalFilePathUtil.appendCommitTimeAndExternalFileMarker(
+                            fileName, commitTime, prefix))
+            .orElseGet(
+                () ->
+                    ExternalFilePathUtil.appendCommitTimeAndExternalFileMarker(
+                        filePath, commitTime));
     writeStatus.setFileId(fileId);
     writeStatus.setPartitionPath(partitionPath);
     HoodieDeltaWriteStat writeStat = new HoodieDeltaWriteStat();
     writeStat.setFileId(fileId);
-    writeStat.setPath(
-        ExternalFilePathUtil.appendCommitTimeAndExternalFileMarker(filePath, commitTime));
+    writeStat.setPath(markedPath);
     writeStat.setPartitionPath(partitionPath);
     writeStat.setNumWrites(file.getRecordCount());
     writeStat.setTotalWriteBytes(file.getFileSizeBytes());
@@ -339,7 +380,6 @@ public class BaseFileUpdatesExtractor {
   }
 
   private String getPartitionPath(Path tableBasePath, List<InternalDataFile> files) {
-    return HudiPathUtils.getPartitionPath(
-        tableBasePath, new CachingPath(files.get(0).getPhysicalPath()));
+    return getHudiPartitionPath(tableBasePath, files.get(0));
   }
 }
diff --git a/xtable-core/src/main/java/org/apache/xtable/hudi/HudiConversionSource.java b/xtable-core/src/main/java/org/apache/xtable/hudi/HudiConversionSource.java
index ecf3877e..483ee3c1 100644
--- a/xtable-core/src/main/java/org/apache/xtable/hudi/HudiConversionSource.java
+++ b/xtable-core/src/main/java/org/apache/xtable/hudi/HudiConversionSource.java
@@ -21,12 +21,15 @@ package org.apache.xtable.hudi;
 import static org.apache.hudi.common.table.timeline.InstantComparison.LESSER_THAN_OR_EQUALS;
 
 import java.time.Instant;
-import java.util.ArrayList;
 import java.util.Collections;
+import java.util.Comparator;
 import java.util.List;
 import java.util.Map;
 import java.util.Objects;
+import java.util.Optional;
+import java.util.function.Function;
 import java.util.stream.Collectors;
+import java.util.stream.Stream;
 
 import lombok.Builder;
 import lombok.NonNull;
@@ -42,8 +45,6 @@ import org.apache.hudi.common.table.timeline.InstantComparison;
 import org.apache.hudi.common.util.Option;
 
 import com.google.common.base.Strings;
-import com.google.common.collect.Iterators;
-import com.google.common.collect.PeekingIterator;
 
 import org.apache.xtable.collectors.CustomCollectors;
 import org.apache.xtable.exception.ReadException;
@@ -83,13 +84,7 @@ public class HudiConversionSource implements ConversionSource<HoodieInstant> {
   public InternalTable getCurrentTable() {
     HoodieActiveTimeline activeTimeline = metaClient.getActiveTimeline();
     HoodieTimeline completedTimeline = activeTimeline.filterCompletedInstants();
-    // get latest commit
-    HoodieInstant latestCommit =
-        completedTimeline
-            .lastInstant()
-            .orElseThrow(
-                () -> new ReadException("Unable to read latest commit from Hudi source table"));
-    return getTable(latestCommit);
+    return getTable(getLatestCompletedInstant(completedTimeline));
   }
 
   @Override
@@ -97,16 +92,18 @@ public class HudiConversionSource implements ConversionSource<HoodieInstant> {
     HoodieActiveTimeline activeTimeline = metaClient.getActiveTimeline();
     HoodieTimeline completedTimeline = activeTimeline.filterCompletedInstants();
     // get latest commit
-    HoodieInstant latestCommit =
-        completedTimeline
-            .lastInstant()
-            .orElseThrow(
-                () -> new ReadException("Unable to read latest commit from Hudi source table"));
+    HoodieInstant latestCommit = getLatestCompletedInstant(completedTimeline);
+    // On table version 9 (timeline layout V2) a commit becomes visible at its completion time, so
+    // an instant with an earlier requested time may complete after the latest commit. Capture all
+    // currently inflight/requested instants as pending so none are missed; on version 6 keep the
+    // historical requested-time window.
     List<HoodieInstant> pendingInstants =
-        activeTimeline
-            .filterInflightsAndRequested()
-            .findInstantsBefore(latestCommit.requestedTime())
-            .getInstants();
+        usesCompletionTimeOrdering()
+            ? activeTimeline.filterInflightsAndRequested().getInstants()
+            : activeTimeline
+                .filterInflightsAndRequested()
+                .findInstantsBefore(latestCommit.requestedTime())
+                .getInstants();
     InternalTable table = getTable(latestCommit);
     return InternalSnapshot.builder()
         .table(table)
@@ -124,10 +121,17 @@ public class HudiConversionSource implements ConversionSource<HoodieInstant> {
   @Override
   public TableChange getTableChangeForCommit(HoodieInstant hoodieInstantForDiff) {
     HoodieActiveTimeline activeTimeline = metaClient.getActiveTimeline();
+    // The set of commits visible as-of the diff commit is ordered by completion time on table
+    // version 9 (timeline layout V2) and by requested time on version 6.
     HoodieTimeline visibleTimeline =
-        activeTimeline
-            .filterCompletedInstants()
-            .findInstantsBeforeOrEquals(hoodieInstantForDiff.requestedTime());
+        usesCompletionTimeOrdering()
+            ? activeTimeline
+                .filterCompletedInstants()
+                .findInstantsModifiedBeforeOrEqualsByCompletionTime(
+                    hoodieInstantForDiff.getCompletionTime())
+            : activeTimeline
+                .filterCompletedInstants()
+                .findInstantsBeforeOrEquals(hoodieInstantForDiff.requestedTime());
     InternalTable table = getTable(hoodieInstantForDiff);
     return TableChange.builder()
         .tableAsOfChange(table)
@@ -150,11 +154,15 @@ public class HudiConversionSource implements ConversionSource<HoodieInstant> {
     List<HoodieInstant> commitsToProcessNext =
         mergeAndDedupLists(
             lastPendingHoodieInstantsCommitsPair.getCompletedCommits(),
-            commitsPair.getCompletedCommits());
+            commitsPair.getCompletedCommits(),
+            hoodieInstant -> hoodieInstant.requestedTime() + "_" + hoodieInstant.getAction(),
+            instantOrdering());
     List<Instant> pendingInstantsToProcessNext =
         mergeAndDedupLists(
             lastPendingHoodieInstantsCommitsPair.getPendingCommits(),
-            commitsPair.getPendingCommits());
+            commitsPair.getPendingCommits(),
+            Function.identity(),
+            Comparator.naturalOrder());
     return CommitsBacklog.<HoodieInstant>builder()
         .commitsToProcess(commitsToProcessNext)
         .inFlightInstants(pendingInstantsToProcessNext)
@@ -178,6 +186,12 @@ public class HudiConversionSource implements ConversionSource<HoodieInstant> {
 
   @SneakyThrows
   private boolean isAffectedByCleanupProcess(Instant instant) {
+    // On table version 8+ the checkpoint is a completion time, but the cleaner retains commits by
+    // requested time, so check the cleaner against the requested time of the synced commit.
+    Instant cleanerCheckInstant =
+        usesCompletionTimeOrdering()
+            ? HudiInstantUtils.parseFromInstantTime(getCommitAtInstant(instant).requestedTime())
+            : instant;
     Option<HoodieInstant> lastCleanInstant =
         metaClient.getActiveTimeline().getCleanerTimeline().filterCompletedInstants().lastInstant();
     if (!lastCleanInstant.isPresent()) {
@@ -187,11 +201,11 @@ public class HudiConversionSource implements ConversionSource<HoodieInstant> {
         metaClient.getActiveTimeline().readCleanMetadata(lastCleanInstant.get());
     String earliestCommitToRetain = cleanMetadata.getEarliestCommitToRetain();
     if (Strings.isNullOrEmpty(earliestCommitToRetain)) {
-      return cleanInstantsOccurredSinceLastSyncedInstant(instant);
+      return cleanInstantsOccurredSinceLastSyncedInstant(cleanerCheckInstant);
     }
     Instant earliestCommitToRetainInstant =
         HudiInstantUtils.parseFromInstantTime(earliestCommitToRetain);
-    return earliestCommitToRetainInstant.isAfter(instant);
+    return earliestCommitToRetainInstant.isAfter(cleanerCheckInstant);
   }
 
   // When clean instants have empty earliestCommitToRetain, trigger full snapshot sync if any
@@ -237,10 +251,54 @@ public class HudiConversionSource implements ConversionSource<HoodieInstant> {
     return metaClient.getActiveTimeline().filterCompletedInstants();
   }
 
+  private boolean usesCompletionTimeOrdering() {
+    return HudiInstantUtils.usesCompletionTimeOrdering(metaClient);
+  }
+
+  private HoodieInstant getLatestCompletedInstant(HoodieTimeline completedTimeline) {
+    return completedTimeline
+        .getInstantsAsStream()
+        .max(instantOrdering())
+        .orElseThrow(
+            () -> new ReadException("Unable to read latest commit from Hudi source table"));
+  }
+
+  /**
+   * Selects the commits that completed after the last synced commit's completion time, ordered by
+   * completion time. Unlike the requested-time path this also surfaces commits whose requested time
+   * is older than the last synced commit but whose completion is newer (out-of-order completion).
+   */
+  private CommitsPair getCompletedAndPendingCommitsAfterCompletionTime(
+      HoodieInstant commitInstant) {
+    List<HoodieInstant> modifiedAfter =
+        metaClient
+            .getActiveTimeline()
+            .findInstantsModifiedAfterByCompletionTime(commitInstant.getCompletionTime())
+            .getInstants();
+    List<HoodieInstant> completedInstants =
+        modifiedAfter.stream()
+            .filter(HoodieInstant::isCompleted)
+            .sorted(Comparator.comparing(HoodieInstant::getCompletionTime))
+            .collect(Collectors.toList());
+    List<Instant> pendingInstants =
+        modifiedAfter.stream()
+            .filter(hoodieInstant -> hoodieInstant.isInflight() || hoodieInstant.isRequested())
+            .map(
+                hoodieInstant ->
+                    HudiInstantUtils.parseFromInstantTime(hoodieInstant.requestedTime()))
+            .collect(Collectors.toList());
+    return CommitsPair.builder()
+        .completedCommits(completedInstants)
+        .pendingCommits(pendingInstants)
+        .build();
+  }
+
   private CommitsPair getCompletedAndPendingCommitsAfterInstant(HoodieInstant commitInstant) {
+    if (usesCompletionTimeOrdering()) {
+      return getCompletedAndPendingCommitsAfterCompletionTime(commitInstant);
+    }
     // Table version 6 uses the old timeline view, so instants are selected and ordered by their
-    // requested (instant) time. Completion-time based handling will be added with table version 9
-    // support in a follow-up PR.
+    // requested (instant) time.
     List<HoodieInstant> allInstants =
         metaClient
             .getActiveTimeline()
@@ -275,12 +333,58 @@ public class HudiConversionSource implements ConversionSource<HoodieInstant> {
   }
 
   private HoodieInstant getCommitAtInstant(Instant instant) {
+    if (usesCompletionTimeOrdering()) {
+      return getCommitAtCompletionTime(instant);
+    }
     return getCompletedCommits()
         .findInstantsBeforeOrEquals(HudiInstantUtils.convertInstantToCommit(instant))
         .lastInstant()
         .orElse(null);
   }
 
+  /**
+   * Resolves a sync checkpoint on table version 8+, where the checkpoint is a completion time (see
+   * {@link HudiInstantUtils#getSyncInstant}). A checkpoint written while the source table was on
+   * version 6 holds a requested time, so an exact requested-time match is accepted next. Otherwise
+   * the last commit that completed at or before the checkpoint is returned.
+   */
+  private HoodieInstant getCommitAtCompletionTime(Instant instant) {
+    List<HoodieInstant> completedInstants =
+        getCompletedCommits().getInstants().stream()
+            .filter(hoodieInstant -> hoodieInstant.getCompletionTime() != null)
+            .collect(Collectors.toList());
+    Optional<HoodieInstant> completedAtInstant =
+        completedInstants.stream()
+            .filter(
+                hoodieInstant ->
+                    HudiInstantUtils.parseFromInstantTime(hoodieInstant.getCompletionTime())
+                        .equals(instant))
+            .findFirst();
+    if (completedAtInstant.isPresent()) {
+      return completedAtInstant.get();
+    }
+    // Savepoint instants reuse the requested time of the commit they pin, hence filtering.
+    Optional<HoodieInstant> requestedAtInstant =
+        completedInstants.stream()
+            .filter(
+                hoodieInstant -> !HoodieTimeline.SAVEPOINT_ACTION.equals(hoodieInstant.getAction()))
+            .filter(
+                hoodieInstant ->
+                    HudiInstantUtils.parseFromInstantTime(hoodieInstant.requestedTime())
+                        .equals(instant))
+            .findFirst();
+    if (requestedAtInstant.isPresent()) {
+      return requestedAtInstant.get();
+    }
+    return completedInstants.stream()
+        .filter(
+            hoodieInstant ->
+                !HudiInstantUtils.parseFromInstantTime(hoodieInstant.getCompletionTime())
+                    .isAfter(instant))
+        .max(Comparator.comparing(HoodieInstant::getCompletionTime))
+        .orElse(null);
+  }
+
   private List<HoodieInstant> getCommitsForInstants(List<Instant> instants) {
     if (instants == null || instants.isEmpty()) {
       return Collections.emptyList();
@@ -302,39 +406,26 @@ public class HudiConversionSource implements ConversionSource<HoodieInstant> {
   }
 
   /**
-   * Merges commits from two lists and returns new list of sorted commits by eliminating duplicates.
-   *
-   * @param list1 First sorted input list of commits
-   * @param list2 Second sorted input list of commits.
-   * @return merged list of commits in sorted order.
+   * Merges two lists, keeps the first element for each key, and sorts the result. Commits are
+   * sorted with the timeline layout's ordering, which is the requested time on table version 6 and
+   * the completion time on version 9. Commits are keyed by requested time and action, because a
+   * savepoint instant reuses the requested time of the commit it pins.
    */
-  private <T extends Comparable<T>> List<T> mergeAndDedupLists(
-      @NonNull List<T> list1, @NonNull List<T> list2) {
-    List<T> mergedList = new ArrayList<>();
-    PeekingIterator<T> itr1 = Iterators.peekingIterator(list1.iterator());
-    PeekingIterator<T> itr2 = Iterators.peekingIterator(list2.iterator());
-    while (itr1.hasNext() || itr2.hasNext()) {
-      if (!itr2.hasNext()) {
-        mergedList.add(itr1.next());
-      } else if (!itr1.hasNext()) {
-        mergedList.add(itr2.next());
-      } else {
-        T element1 = itr1.peek();
-        T element2 = itr2.peek();
-        if (element1.compareTo(element2) < 0) {
-          mergedList.add(element1);
-          itr1.next();
-        } else if (element1.compareTo(element2) > 0) {
-          mergedList.add(element2);
-          itr2.next();
-        } else {
-          mergedList.add(element1);
-          itr1.next();
-          itr2.next();
-        }
-      }
-    }
-    return mergedList;
+  private <T, K> List<T> mergeAndDedupLists(
+      @NonNull List<T> list1,
+      @NonNull List<T> list2,
+      Function<T, K> keyExtractor,
+      Comparator<T> ordering) {
+    return Stream.concat(list1.stream(), list2.stream())
+        .collect(Collectors.toMap(keyExtractor, Function.identity(), (first, second) -> first))
+        .values()
+        .stream()
+        .sorted(ordering)
+        .collect(Collectors.toList());
+  }
+
+  private Comparator<HoodieInstant> instantOrdering() {
+    return metaClient.getTimelineLayout().getInstantComparator().orderingComparator();
   }
 
   @Override
diff --git a/xtable-core/src/main/java/org/apache/xtable/hudi/HudiConversionTarget.java b/xtable-core/src/main/java/org/apache/xtable/hudi/HudiConversionTarget.java
index 84a1ffa0..6523b519 100644
--- a/xtable-core/src/main/java/org/apache/xtable/hudi/HudiConversionTarget.java
+++ b/xtable-core/src/main/java/org/apache/xtable/hudi/HudiConversionTarget.java
@@ -27,6 +27,7 @@ import java.io.IOException;
 import java.time.temporal.ChronoUnit;
 import java.util.Arrays;
 import java.util.Collections;
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.Optional;
@@ -34,6 +35,7 @@ import java.util.Properties;
 import java.util.Set;
 import java.util.function.Function;
 import java.util.stream.Collectors;
+import java.util.stream.Stream;
 
 import lombok.Getter;
 import lombok.Setter;
@@ -50,7 +52,7 @@ import org.apache.hudi.client.HoodieJavaWriteClient;
 import org.apache.hudi.client.WriteStatus;
 import org.apache.hudi.client.common.HoodieJavaEngineContext;
 import org.apache.hudi.client.timeline.HoodieTimelineArchiver;
-import org.apache.hudi.client.timeline.versioning.v1.TimelineArchiverV1;
+import org.apache.hudi.client.timeline.TimelineArchivers;
 import org.apache.hudi.common.HoodieCleanStat;
 import org.apache.hudi.common.config.HoodieMetadataConfig;
 import org.apache.hudi.common.engine.HoodieEngineContext;
@@ -80,6 +82,7 @@ import org.apache.hudi.hadoop.fs.CachingPath;
 import org.apache.hudi.metadata.HoodieIndexVersion;
 import org.apache.hudi.metadata.HoodieTableMetadataWriter;
 import org.apache.hudi.table.HoodieJavaTable;
+import org.apache.hudi.table.HoodieTable;
 import org.apache.hudi.table.action.clean.CleanPlanner;
 
 import com.google.common.annotations.VisibleForTesting;
@@ -101,6 +104,10 @@ import org.apache.xtable.spi.sync.ConversionTarget;
 
 @Log4j2
 public class HudiConversionTarget implements ConversionTarget {
+  // Commit extra-metadata key that marks a table whose file groups use the file-group prefix
+  // layout, where a file such as Paimon's <partition>/bucket-N/<file> is registered under
+  // <partition>.
+  static final String FILE_GROUP_PREFIX_LAYOUT = "XTABLE_HUDI_FILE_GROUP_PREFIX_LAYOUT";
   private BaseFileUpdatesExtractor baseFileUpdatesExtractor;
   private AvroSchemaConverter avroSchemaConverter;
   private HudiTableManager hudiTableManager;
@@ -112,6 +119,9 @@ public class HudiConversionTarget implements ConversionTarget {
   private CommitState commitState;
   // database to register the target table under, resolved from the target namespace
   private String databaseName;
+  // Hudi table format version to write (6 = legacy 0.x layout, 9 = Hudi 1.x layout), resolved from
+  // the xtable.hudi.target.table_version config; defaults to version 6.
+  private HoodieTableVersion tableVersion = HudiTargetConfig.DEFAULT_TABLE_VERSION;
 
   public HudiConversionTarget() {}
 
@@ -131,6 +141,9 @@ public class HudiConversionTarget implements ConversionTarget {
         HudiTableManager.of(configuration),
         CommitState::new);
     this.databaseName = resolveDatabaseName(targetTable);
+    this.tableVersion =
+        HudiTargetConfig.fromProperties(targetTable.getAdditionalProperties()).getTableVersion();
+    warnIfExistingTableVersionDiffers();
   }
 
   @VisibleForTesting
@@ -185,6 +198,30 @@ public class HudiConversionTarget implements ConversionTarget {
         HudiTableManager.of(configuration),
         CommitState::new);
     this.databaseName = resolveDatabaseName(targetTable);
+    this.tableVersion =
+        HudiTargetConfig.fromProperties(targetTable.getAdditionalProperties()).getTableVersion();
+    warnIfExistingTableVersionDiffers();
+  }
+
+  /**
+   * The configured table version applies only when the table is created, so an existing table keeps
+   * its own version.
+   */
+  private void warnIfExistingTableVersionDiffers() {
+    metaClient.ifPresent(
+        client -> {
+          HoodieTableVersion existingVersion = client.getTableConfig().getTableVersion();
+          if (existingVersion != tableVersion) {
+            log.warn(
+                "Hudi target table at {} is at table version {}, which differs from the configured {}={}."
+                    + " The configured version applies only when the table is created, so the table stays at version {}.",
+                tableDataPath,
+                existingVersion.versionCode(),
+                HudiTargetConfig.HUDI_TABLE_VERSION,
+                tableVersion.versionCode(),
+                existingVersion.versionCode());
+          }
+        });
   }
 
   /** Uses the first namespace level as the Hudi database name, or the default if none is set. */
@@ -269,6 +306,8 @@ public class HudiConversionTarget implements ConversionTarget {
         baseFileUpdatesExtractor.extractSnapshotChanges(
             partitionedDataFiles, getMetaClient(), commitState.getInstantTime());
     commitState.setReplaceMetadata(replaceMetadata);
+    // A snapshot sync replaces every file group, so the table uses the file-group prefix layout.
+    commitState.setFileGroupPrefixLayout(true);
   }
 
   @Override
@@ -276,19 +315,65 @@ public class HudiConversionTarget implements ConversionTarget {
     if (!metaClient.isPresent()) {
       throw new IllegalStateException("Meta client is not initialized");
     }
+    boolean fileGroupPrefixLayout = lastCommitHasFileGroupPrefixLayout(metaClient.get());
+    if (!fileGroupPrefixLayout && hasPartitionSubdirectory(internalFilesDiff)) {
+      throw new NotSupportedException(
+          String.format(
+              "Hudi target table at %s registered files that have a partition subdirectory as"
+                  + " separate partitions, and an incremental sync cannot update this layout. Run"
+                  + " one sync with syncMode FULL, and incremental sync then resumes.",
+              tableDataPath));
+    }
     HoodieIndexVersion indexVersion =
         existingIndexVersionOrDefault(PARTITION_NAME_COLUMN_STATS, metaClient.get());
     BaseFileUpdatesExtractor.ReplaceMetadata replaceMetadata =
         baseFileUpdatesExtractor.convertDiff(
             internalFilesDiff, commitState.getInstantTime(), indexVersion);
     commitState.setReplaceMetadata(replaceMetadata);
+    // An incremental sync keeps the file groups in place, so it carries the layout forward.
+    commitState.setFileGroupPrefixLayout(fileGroupPrefixLayout);
+  }
+
+  private static boolean hasPartitionSubdirectory(InternalFilesDiff internalFilesDiff) {
+    return Stream.concat(
+            internalFilesDiff.dataFilesAdded().stream(),
+            internalFilesDiff.dataFilesRemoved().stream())
+        .anyMatch(file -> file.getPartitionSubdirectory().isPresent());
+  }
+
+  /**
+   * A target written without {@link #FILE_GROUP_PREFIX_LAYOUT} registered files that have a
+   * partition subdirectory under {@code <partition>/<subdirectory>} partitions. A table without
+   * completed commits has no file groups, so it uses the new layout.
+   */
+  private static boolean lastCommitHasFileGroupPrefixLayout(HoodieTableMetaClient client) {
+    return client
+        .getActiveTimeline()
+        .getCommitsTimeline()
+        .filterCompletedInstants()
+        .lastInstant()
+        .toJavaOptional()
+        .map(
+            instant -> {
+              try {
+                return Boolean.parseBoolean(
+                    TimelineUtils.getCommitMetadata(instant, client.getActiveTimeline())
+                        .getExtraMetadata()
+                        .get(FILE_GROUP_PREFIX_LAYOUT));
+              } catch (IOException ex) {
+                throw new ReadException("Unable to read commit metadata for " + instant, ex);
+              }
+            })
+        .orElse(true);
   }
 
   @Override
   public void beginSync(InternalTable table) {
     if (!metaClient.isPresent()) {
       metaClient =
-          Optional.of(hudiTableManager.initializeHudiTable(tableDataPath, table, databaseName));
+          Optional.of(
+              hudiTableManager.initializeHudiTable(
+                  tableDataPath, table, databaseName, tableVersion));
     } else {
       // make sure meta client has up-to-date view of the timeline
       getMetaClient().reloadActiveTimeline();
@@ -381,6 +466,7 @@ public class HudiConversionTarget implements ConversionTarget {
     private List<WriteStatus> writeStatuses;
     @Setter private Schema schema;
     @Setter private TableSyncMetadata tableSyncMetadata;
+    @Setter private boolean fileGroupPrefixLayout;
     private Map<String, List<String>> partitionToReplacedFileIds;
 
     private CommitState(
@@ -572,14 +658,15 @@ public class HudiConversionTarget implements ConversionTarget {
                           entry.getValue().stream()
                               .map(HoodieCleanFileInfo::getFilePath)
                               .collect(Collectors.toList());
-                      return new HoodieCleanStat(
-                          HoodieCleaningPolicy.KEEP_LATEST_COMMITS,
-                          partitionPath,
-                          deletePaths,
-                          deletePaths,
-                          Collections.emptyList(),
-                          earliestInstant.get().requestedTime(),
-                          instantTime);
+                      return HoodieCleanStat.builder()
+                          .withPolicy(HoodieCleaningPolicy.KEEP_LATEST_COMMITS)
+                          .withPartitionPath(partitionPath)
+                          .withDeletePathPatterns(deletePaths)
+                          .withSuccessDeleteFiles(deletePaths)
+                          .withFailedDeleteFiles(Collections.emptyList())
+                          .withEarliestCommitToRetain(earliestInstant.get().requestedTime())
+                          .withLastCompletedCommitTimestamp(instantTime)
+                          .build();
                     })
                 .collect(Collectors.toList());
         HoodieCleanMetadata cleanMetadata =
@@ -599,9 +686,12 @@ public class HudiConversionTarget implements ConversionTarget {
 
     private void runArchiver(
         HoodieJavaTable<?> table, HoodieWriteConfig config, HoodieEngineContext engineContext) {
-      // trigger archiver manually
+      // trigger archiver manually, selecting the archiver implementation that matches the table's
+      // timeline layout (V1 for table version 6, V2/LSM for table version 9).
       try {
-        HoodieTimelineArchiver archiver = new TimelineArchiverV1(config, table);
+        HoodieTimelineArchiver archiver =
+            TimelineArchivers.getInstance(
+                table.getMetaClient().getTimelineLayoutVersion(), config, (HoodieTable) table);
         archiver.archiveIfRequired(engineContext, true);
       } catch (IOException ex) {
         throw new UpdateException("Unable to archive Hudi timeline", ex);
@@ -609,8 +699,11 @@ public class HudiConversionTarget implements ConversionTarget {
     }
 
     private Option<Map<String, String>> getExtraMetadata() {
-      Map<String, String> extraMetadata =
-          Collections.singletonMap(TableSyncMetadata.XTABLE_METADATA, tableSyncMetadata.toJson());
+      Map<String, String> extraMetadata = new HashMap<>();
+      extraMetadata.put(TableSyncMetadata.XTABLE_METADATA, tableSyncMetadata.toJson());
+      if (fileGroupPrefixLayout) {
+        extraMetadata.put(FILE_GROUP_PREFIX_LAYOUT, Boolean.TRUE.toString());
+      }
       return Option.of(extraMetadata);
     }
 
@@ -622,10 +715,11 @@ public class HudiConversionTarget implements ConversionTarget {
       Properties properties = new Properties();
       properties.setProperty(HoodieMetadataConfig.AUTO_INITIALIZE.key(), "false");
       return HoodieWriteConfig.newBuilder()
-          // Pin writes to table version 6 and disable auto-upgrade so the write client does not
-          // upgrade the table to version 9 (Hudi 1.x). Table version 9 support will be added in a
-          // follow-up PR, tracked in https://github.com/apache/incubator-xtable/issues/834.
-          .withWriteTableVersion(HoodieTableVersion.SIX.versionCode())
+          // Write at the table's own format version (selected via xtable.hudi.target.table_version,
+          // default 6) and disable auto-upgrade so the write client never migrates the table to a
+          // different version behind our back. See
+          // https://github.com/apache/incubator-xtable/issues/834.
+          .withWriteTableVersion(metaClient.getTableConfig().getTableVersion().versionCode())
           .withAutoUpgradeVersion(false)
           .withIndexConfig(HoodieIndexConfig.newBuilder().withIndexType(INMEMORY).build())
           .withPath(metaClient.getBasePath().toString())
@@ -648,14 +742,14 @@ public class HudiConversionTarget implements ConversionTarget {
               HoodieMetadataConfig.newBuilder()
                   .enable(true)
                   .withProperties(properties)
-                  // Hudi 1.2.0 couples the partition-stats index to the column-stats index. For
-                  // partitioned tables, the partition-stats generation path rebuilds a file-system
-                  // view over the committed external parquet files and groups them by fileId.
-                  // XTable's externally-registered files have non-Hudi names whose fileId cannot be
-                  // parsed once the "_hudiext" marker is stripped, which leads to failures. So
-                  // column stats are only enabled for un-partitioned tables for now. Tracked in
-                  // https://github.com/apache/incubator-xtable/issues/832.
-                  .withMetadataIndexColumnStats(!metaClient.getTableConfig().isTablePartitioned())
+                  // Build the column-stats index for all tables, but not the partition-stats
+                  // index. Its generation path rebuilds a file-system view over the committed
+                  // external parquet files and groups them by fileId, but XTable's
+                  // externally-registered files have non-Hudi names whose fileId cannot be parsed
+                  // once the "_hudiext" marker is stripped, which leads to failures on partitioned
+                  // tables.
+                  .withMetadataIndexColumnStats(true)
+                  .withMetadataIndexPartitionStats(false)
                   .withMaxNumDeltaCommitsBeforeCompaction(maxNumDeltaCommitsBeforeCompaction)
                   .build())
           .build();
diff --git a/xtable-core/src/main/java/org/apache/xtable/hudi/HudiInstantUtils.java b/xtable-core/src/main/java/org/apache/xtable/hudi/HudiInstantUtils.java
index 7ed9c49c..13deb81f 100644
--- a/xtable-core/src/main/java/org/apache/xtable/hudi/HudiInstantUtils.java
+++ b/xtable-core/src/main/java/org/apache/xtable/hudi/HudiInstantUtils.java
@@ -30,6 +30,9 @@ import java.time.format.DateTimeFormatterBuilder;
 import java.time.format.DateTimeParseException;
 import java.time.temporal.ChronoField;
 
+import org.apache.hudi.common.table.HoodieTableMetaClient;
+import org.apache.hudi.common.table.HoodieTableVersion;
+import org.apache.hudi.common.table.timeline.HoodieInstant;
 import org.apache.hudi.common.table.timeline.HoodieInstantTimeGenerator;
 
 import org.apache.xtable.model.exception.ParseException;
@@ -75,6 +78,30 @@ class HudiInstantUtils {
     return HoodieInstantTimeGenerator.getInstantFromTemporalAccessor(instantTime);
   }
 
+  /**
+   * Table version 8+ (Hudi 1.x, timeline layout V2) makes a commit visible at its completion time
+   * rather than its requested (instant) time, so incremental selection and ordering must be based
+   * on completion time. Table version 6 keeps the legacy requested-time ordering.
+   */
+  static boolean usesCompletionTimeOrdering(HoodieTableMetaClient metaClient) {
+    return metaClient
+        .getTableConfig()
+        .getTableVersion()
+        .greaterThanOrEquals(HoodieTableVersion.EIGHT);
+  }
+
+  /**
+   * Returns the time that identifies a source commit in the sync checkpoint. It is the completion
+   * time on table version 8+, so the checkpoints move forward in the same order that the commits
+   * are synced, and the requested time on older versions.
+   */
+  static Instant getSyncInstant(HoodieTableMetaClient metaClient, HoodieInstant commit) {
+    if (usesCompletionTimeOrdering(metaClient) && commit.getCompletionTime() != null) {
+      return parseFromInstantTime(commit.getCompletionTime());
+    }
+    return parseFromInstantTime(commit.requestedTime());
+  }
+
   private static boolean isSecondGranularity(String instant) {
     return instant.length() == SECS_INSTANT_ID_LENGTH;
   }
diff --git a/xtable-core/src/main/java/org/apache/xtable/hudi/HudiTableExtractor.java b/xtable-core/src/main/java/org/apache/xtable/hudi/HudiTableExtractor.java
index 3a75f2bd..f5164b49 100644
--- a/xtable-core/src/main/java/org/apache/xtable/hudi/HudiTableExtractor.java
+++ b/xtable-core/src/main/java/org/apache/xtable/hudi/HudiTableExtractor.java
@@ -87,7 +87,7 @@ public class HudiTableExtractor {
         .partitioningFields(partitionFields)
         .readSchema(canonicalSchema)
         .latestMetadataPath(metaClient.getMetaPath().toString())
-        .latestCommitTime(HudiInstantUtils.parseFromInstantTime(commit.requestedTime()))
+        .latestCommitTime(HudiInstantUtils.getSyncInstant(metaClient, commit))
         .build();
   }
 
diff --git a/xtable-core/src/main/java/org/apache/xtable/hudi/HudiTableManager.java b/xtable-core/src/main/java/org/apache/xtable/hudi/HudiTableManager.java
index b6203d90..fbf232a9 100644
--- a/xtable-core/src/main/java/org/apache/xtable/hudi/HudiTableManager.java
+++ b/xtable-core/src/main/java/org/apache/xtable/hudi/HudiTableManager.java
@@ -92,10 +92,14 @@ public class HudiTableManager {
    * @param table the table to initialize
    * @param databaseName the database to register the table under; when null/empty the table falls
    *     back to {@link #DEFAULT_DATABASE_NAME}
+   * @param tableVersion the Hudi table format version to initialize the table with
    * @return {@link HoodieTableMetaClient} for the table that was created
    */
   HoodieTableMetaClient initializeHudiTable(
-      String tableDataPath, InternalTable table, String databaseName) {
+      String tableDataPath,
+      InternalTable table,
+      String databaseName,
+      HoodieTableVersion tableVersion) {
     String recordKeyField = "";
     if (table.getReadSchema() != null) {
       List<String> recordKeys =
@@ -119,10 +123,10 @@ public class HudiTableManager {
           .setCommitTimezone(HoodieTimelineTimeZone.UTC)
           .setHiveStylePartitioningEnable(hiveStylePartitioningEnabled)
           .setTableType(HoodieTableType.COPY_ON_WRITE)
-          // Pin new tables to table version 6 for now. Table version 9 (Hudi 1.x) support will be
-          // added in a follow-up PR, tracked in
+          // Table format version (6 = legacy 0.x layout, 9 = Hudi 1.x layout) is selected via the
+          // xtable.hudi.target.table_version config and defaults to 6. See
           // https://github.com/apache/incubator-xtable/issues/834.
-          .setTableVersion(HoodieTableVersion.SIX)
+          .setTableVersion(tableVersion)
           .setTableName(table.getName())
           .setDatabaseName(resolvedDatabaseName)
           .setPayloadClass(HoodieAvroPayload.class)
diff --git a/xtable-core/src/main/java/org/apache/xtable/hudi/HudiTargetConfig.java b/xtable-core/src/main/java/org/apache/xtable/hudi/HudiTargetConfig.java
new file mode 100644
index 00000000..34541e61
--- /dev/null
+++ b/xtable-core/src/main/java/org/apache/xtable/hudi/HudiTargetConfig.java
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+package org.apache.xtable.hudi;
+
+import java.util.Properties;
+
+import lombok.Value;
+
+import org.apache.hudi.common.table.HoodieTableVersion;
+import org.apache.hudi.exception.HoodieException;
+
+/** Configuration of the Hudi conversion target. */
+@Value
+public class HudiTargetConfig {
+  /**
+   * Table format version to write for the Hudi target. Supported values are {@code 6} (the legacy
+   * 0.x timeline layout, column-stats index V1) and {@code 9} (the Hudi 1.x timeline layout,
+   * column-stats index V2). Defaults to {@code 6}.
+   */
+  public static final String HUDI_TABLE_VERSION = "xtable.hudi.target.table_version";
+
+  static final HoodieTableVersion DEFAULT_TABLE_VERSION = HoodieTableVersion.SIX;
+
+  HoodieTableVersion tableVersion;
+
+  public static HudiTargetConfig fromProperties(Properties properties) {
+    HoodieTableVersion tableVersion = DEFAULT_TABLE_VERSION;
+    if (properties != null) {
+      String configured = properties.getProperty(HUDI_TABLE_VERSION);
+      if (configured != null && !configured.trim().isEmpty()) {
+        tableVersion = parseTableVersion(configured.trim());
+      }
+    }
+    if (tableVersion != HoodieTableVersion.SIX && tableVersion != HoodieTableVersion.NINE) {
+      throw unsupportedTableVersion(String.valueOf(tableVersion.versionCode()), null);
+    }
+    return new HudiTargetConfig(tableVersion);
+  }
+
+  private static HoodieTableVersion parseTableVersion(String configured) {
+    try {
+      return HoodieTableVersion.fromVersionCode(Integer.parseInt(configured));
+    } catch (NumberFormatException | HoodieException e) {
+      // A non-numeric value, or a version code that Hudi does not know.
+      throw unsupportedTableVersion(configured, e);
+    }
+  }
+
+  private static IllegalArgumentException unsupportedTableVersion(String value, Throwable cause) {
+    return new IllegalArgumentException(
+        String.format(
+            "Unsupported Hudi target table version %s. Only table versions 6 and 9 are supported via %s.",
+            value, HUDI_TABLE_VERSION),
+        cause);
+  }
+}
diff --git a/xtable-core/src/main/java/org/apache/xtable/paimon/PaimonDataFileExtractor.java b/xtable-core/src/main/java/org/apache/xtable/paimon/PaimonDataFileExtractor.java
index e452c85b..0e3ac4b8 100644
--- a/xtable-core/src/main/java/org/apache/xtable/paimon/PaimonDataFileExtractor.java
+++ b/xtable-core/src/main/java/org/apache/xtable/paimon/PaimonDataFileExtractor.java
@@ -78,6 +78,7 @@ public class PaimonDataFileExtractor {
       FileStoreTable table, ManifestEntry entry, InternalSchema internalSchema) {
     return InternalDataFile.builder()
         .physicalPath(toFullPhysicalPath(table, entry))
+        .partitionSubdirectory(Optional.of(bucketPath(entry)))
         .fileSizeBytes(entry.file().fileSize())
         .lastModified(entry.file().creationTimeEpochMillis())
         .recordCount(entry.file().rowCount())
@@ -89,7 +90,7 @@ public class PaimonDataFileExtractor {
 
   private String toFullPhysicalPath(FileStoreTable table, ManifestEntry entry) {
     String basePath = table.location().toString();
-    String bucketPath = "bucket-" + entry.bucket();
+    String bucketPath = bucketPath(entry);
     String filePath = entry.file().fileName();
 
     Optional<String> partitionPath = partitionExtractor.toPartitionPath(table, entry.partition());
@@ -100,6 +101,10 @@ public class PaimonDataFileExtractor {
     }
   }
 
+  private static String bucketPath(ManifestEntry entry) {
+    return "bucket-" + entry.bucket();
+  }
+
   /**
    * Extracts file changes (added and removed files) from delta manifests for a given snapshot. This
    * method reads only the delta manifests which contain the changes introduced in this specific
diff --git a/xtable-core/src/test/java/org/apache/xtable/ITConversionController.java b/xtable-core/src/test/java/org/apache/xtable/ITConversionController.java
index b864e07a..ee6c5c98 100644
--- a/xtable-core/src/test/java/org/apache/xtable/ITConversionController.java
+++ b/xtable-core/src/test/java/org/apache/xtable/ITConversionController.java
@@ -80,6 +80,7 @@ import org.apache.hudi.common.config.TypedProperties;
 import org.apache.hudi.common.model.HoodieAvroPayload;
 import org.apache.hudi.common.model.HoodieRecord;
 import org.apache.hudi.common.model.HoodieTableType;
+import org.apache.hudi.common.table.HoodieTableVersion;
 import org.apache.hudi.common.table.timeline.HoodieInstant;
 
 import org.apache.iceberg.Snapshot;
@@ -101,6 +102,7 @@ import org.apache.xtable.conversion.SourceTable;
 import org.apache.xtable.conversion.TargetTable;
 import org.apache.xtable.delta.DeltaConversionSourceProvider;
 import org.apache.xtable.hudi.HudiConversionSourceProvider;
+import org.apache.xtable.hudi.HudiTargetConfig;
 import org.apache.xtable.hudi.HudiTestUtil;
 import org.apache.xtable.iceberg.IcebergConversionSourceProvider;
 import org.apache.xtable.iceberg.TestIcebergDataHelper;
@@ -148,12 +150,30 @@ public class ITConversionController {
     return addBasicPartitionCases(testCasesWithSyncModes());
   }
 
+  /** Crosses the partitioning and sync mode cases with both Hudi source table versions. */
+  private static Stream<Arguments> testCasesWithPartitioningSyncModesAndSourceVersions() {
+    return testCasesWithPartitioningAndSyncModes()
+        .flatMap(
+            arguments ->
+                Stream.of(HoodieTableVersion.SIX, HoodieTableVersion.NINE)
+                    .map(version -> Arguments.of(arguments.get()[0], arguments.get()[1], version)));
+  }
+
   private static Stream<Arguments> generateTestParametersForFormatsSyncModesAndPartitioning() {
     List<Arguments> arguments = new ArrayList<>();
     for (String sourceFormat : Arrays.asList(HUDI, DELTA, ICEBERG, PAIMON)) {
       for (SyncMode syncMode : SyncMode.values()) {
         for (boolean isPartitioned : new boolean[] {true, false}) {
-          arguments.add(Arguments.of(sourceFormat, syncMode, isPartitioned));
+          if (sourceFormat.equals(HUDI)) {
+            // Hudi is the source here (not a target), so the Hudi target version does not apply.
+            arguments.add(Arguments.of(sourceFormat, syncMode, isPartitioned, null));
+          } else {
+            // Hudi is one of the targets; exercise both supported target versions.
+            arguments.add(
+                Arguments.of(sourceFormat, syncMode, isPartitioned, HoodieTableVersion.SIX));
+            arguments.add(
+                Arguments.of(sourceFormat, syncMode, isPartitioned, HoodieTableVersion.NINE));
+          }
         }
       }
     }
@@ -225,14 +245,12 @@ public class ITConversionController {
   @ParameterizedTest
   @MethodSource("generateTestParametersForFormatsSyncModesAndPartitioning")
   public void testVariousOperations(
-      String sourceTableFormat, SyncMode syncMode, boolean isPartitioned) {
+      String sourceTableFormat,
+      SyncMode syncMode,
+      boolean isPartitioned,
+      HoodieTableVersion hudiTargetVersion) {
     String tableName = getTableName();
     List<String> targetTableFormats = getOtherFormats(sourceTableFormat);
-    if (sourceTableFormat.equals(PAIMON)) {
-      // TODO: Hudi 1.x target is not supported for un-partitioned Paimon source.
-      targetTableFormats =
-          targetTableFormats.stream().filter(fmt -> !fmt.equals(HUDI)).collect(Collectors.toList());
-    }
     String partitionConfig = null;
     if (isPartitioned) {
       partitionConfig = "level:VALUE";
@@ -253,7 +271,8 @@ public class ITConversionController {
               table,
               targetTableFormats,
               partitionConfig,
-              null);
+              null,
+              hudiTargetVersion);
       conversionController.sync(conversionConfig, conversionSourceProvider);
       checkDatasetEquivalence(sourceTableFormat, table, targetTableFormats, 100);
 
@@ -285,7 +304,8 @@ public class ITConversionController {
               tableWithUpdatedSchema,
               targetTableFormats,
               partitionConfig,
-              null);
+              null,
+              hudiTargetVersion);
       List<Row> insertsAfterSchemaUpdate = tableWithUpdatedSchema.insertRows(100);
       tableWithUpdatedSchema.reload();
       conversionController.sync(conversionConfig, conversionSourceProvider);
@@ -366,15 +386,19 @@ public class ITConversionController {
   }
 
   @ParameterizedTest
-  @MethodSource("testCasesWithPartitioningAndSyncModes")
+  @MethodSource("testCasesWithPartitioningSyncModesAndSourceVersions")
   public void testConcurrentInsertWritesInSource(
-      SyncMode syncMode, PartitionConfig partitionConfig) {
+      SyncMode syncMode, PartitionConfig partitionConfig, HoodieTableVersion sourceVersion) {
     String tableName = getTableName();
     ConversionSourceProvider<?> conversionSourceProvider = getConversionSourceProvider(HUDI);
     List<String> targetTableFormats = getOtherFormats(HUDI);
     try (TestJavaHudiTable table =
         TestJavaHudiTable.forStandardSchema(
-            tableName, tempDir, partitionConfig.getHudiConfig(), HoodieTableType.COPY_ON_WRITE)) {
+            tableName,
+            tempDir,
+            partitionConfig.getHudiConfig(),
+            HoodieTableType.COPY_ON_WRITE,
+            sourceVersion)) {
       // commit time 1 starts first but ends 2nd.
       // commit time 2 starts second but ends 1st.
       List<HoodieRecord<HoodieAvroPayload>> insertsForCommit1 = table.generateRecords(50);
@@ -402,6 +426,92 @@ public class ITConversionController {
     }
   }
 
+  /**
+   * A commit that is still inflight during an incremental sync must reach the targets once it
+   * completes, also when a later commit completed first.
+   */
+  @ParameterizedTest
+  @EnumSource(
+      value = HoodieTableVersion.class,
+      names = {"SIX", "NINE"})
+  public void testConcurrentInsertWritesInSourceDuringIncrementalSync(
+      HoodieTableVersion sourceVersion) {
+    String tableName = getTableName();
+    ConversionSourceProvider<?> conversionSourceProvider = getConversionSourceProvider(HUDI);
+    List<String> targetTableFormats = getOtherFormats(HUDI);
+    try (TestJavaHudiTable table =
+        TestJavaHudiTable.forStandardSchema(
+            tableName, tempDir, null, HoodieTableType.COPY_ON_WRITE, sourceVersion)) {
+      ConversionConfig conversionConfig =
+          getTableSyncConfig(
+              HUDI, SyncMode.INCREMENTAL, tableName, table, targetTableFormats, null, null);
+      table.insertRecords(50, true);
+      conversionController.sync(conversionConfig, conversionSourceProvider);
+      checkDatasetEquivalence(HUDI, table, targetTableFormats, 50);
+
+      // commit 1 starts first but ends 2nd, and commit 2 starts second but ends 1st.
+      List<HoodieRecord<HoodieAvroPayload>> insertsForCommit1 = table.generateRecords(50);
+      List<HoodieRecord<HoodieAvroPayload>> insertsForCommit2 = table.generateRecords(50);
+      String commitInstant1 = table.startCommit();
+      String commitInstant2 = table.startCommit();
+      table.insertRecordsWithCommitAlreadyStarted(insertsForCommit2, commitInstant2, true);
+      // incremental sync while commit 1 is inflight
+      conversionController.sync(conversionConfig, conversionSourceProvider);
+      checkDatasetEquivalence(HUDI, table, targetTableFormats, 100);
+
+      table.insertRecordsWithCommitAlreadyStarted(insertsForCommit1, commitInstant1, true);
+      conversionController.sync(conversionConfig, conversionSourceProvider);
+      checkDatasetEquivalence(HUDI, table, targetTableFormats, 150);
+    }
+  }
+
+  /**
+   * An up-to-date target must not apply a commit again when a lagging target makes the sync replay
+   * commits that completed in a different order than they were requested.
+   */
+  @ParameterizedTest
+  @EnumSource(
+      value = HoodieTableVersion.class,
+      names = {"SIX", "NINE"})
+  public void testLaggingTargetWithOutOfOrderCompletedCommits(HoodieTableVersion sourceVersion) {
+    String tableName = getTableName();
+    ConversionSourceProvider<?> conversionSourceProvider = getConversionSourceProvider(HUDI);
+    try (TestJavaHudiTable table =
+        TestJavaHudiTable.forStandardSchema(
+            tableName, tempDir, null, HoodieTableType.COPY_ON_WRITE, sourceVersion)) {
+      ConversionConfig singleTableConfig =
+          getTableSyncConfig(
+              HUDI, SyncMode.INCREMENTAL, tableName, table, ImmutableList.of(ICEBERG), null, null);
+      ConversionConfig dualTableConfig =
+          getTableSyncConfig(
+              HUDI,
+              SyncMode.INCREMENTAL,
+              tableName,
+              table,
+              Arrays.asList(ICEBERG, DELTA),
+              null,
+              null);
+      table.insertRecords(50, true);
+      conversionController.sync(dualTableConfig, conversionSourceProvider);
+      checkDatasetEquivalence(HUDI, table, Arrays.asList(ICEBERG, DELTA), 50);
+
+      // commit 1 starts first but ends 2nd, and commit 2 starts second but ends 1st.
+      List<HoodieRecord<HoodieAvroPayload>> insertsForCommit1 = table.generateRecords(50);
+      List<HoodieRecord<HoodieAvroPayload>> insertsForCommit2 = table.generateRecords(50);
+      String commitInstant1 = table.startCommit();
+      String commitInstant2 = table.startCommit();
+      table.insertRecordsWithCommitAlreadyStarted(insertsForCommit2, commitInstant2, true);
+      table.insertRecordsWithCommitAlreadyStarted(insertsForCommit1, commitInstant1, true);
+
+      // iceberg syncs both commits, and delta lags behind
+      conversionController.sync(singleTableConfig, conversionSourceProvider);
+      checkDatasetEquivalence(HUDI, table, Collections.singletonList(ICEBERG), 150);
+      // delta replays both commits, and iceberg must skip them
+      conversionController.sync(dualTableConfig, conversionSourceProvider);
+      checkDatasetEquivalence(HUDI, table, Arrays.asList(ICEBERG, DELTA), 150);
+    }
+  }
+
   @ParameterizedTest
   @MethodSource("testCasesWithPartitioningAndSyncModes")
   public void testConcurrentInsertsAndTableServiceWrites(
@@ -529,48 +639,53 @@ public class ITConversionController {
     String severityFilter = "severity = 1";
     String timestampAndLevelFilter = String.format("%s and %s", timestampFilter, levelFilter);
     return Stream.of(
-        Arguments.of(
             buildArgsForPartition(
-                HUDI, Arrays.asList(ICEBERG, DELTA), "level:SIMPLE", "level:VALUE", levelFilter)),
-        Arguments.of(
+                HUDI, Arrays.asList(ICEBERG, DELTA), "level:SIMPLE", "level:VALUE", levelFilter),
+            buildArgsForPartition(
+                DELTA, Arrays.asList(ICEBERG, HUDI), null, "level:VALUE", levelFilter),
             buildArgsForPartition(
-                DELTA, Arrays.asList(ICEBERG, HUDI), null, "level:VALUE", levelFilter)),
-        Arguments.of(
+                ICEBERG, Arrays.asList(DELTA, HUDI), null, "level:VALUE", levelFilter),
+            // Delta is excluded here since it does not support nested partition columns.
             buildArgsForPartition(
-                ICEBERG, Arrays.asList(DELTA, HUDI), null, "level:VALUE", levelFilter)),
-        // TODO(hudi-1.2): re-enable the nested partition column case (HUDI -> ICEBERG partitioned
-        // on
-        // "nested_record.level"). Hudi 1.2's HoodieFileGroupReaderBasedFileFormat is the only batch
-        // reader and it converts the partition column into a top-level Avro field named
-        // "nested_record.level", which Avro rejects ("Illegal character in: nested_record.level").
-        // Delta is excluded here anyway since it does not support nested partition columns.
-        // Arguments.of(
-        //     buildArgsForPartition(
-        //         HUDI,
-        //         Arrays.asList(ICEBERG),
-        //         "nested_record.level:SIMPLE",
-        //         "nested_record.level:VALUE",
-        //         nestedLevelFilter)),
-        Arguments.of(
+                HUDI,
+                Arrays.asList(ICEBERG),
+                "nested_record.level:SIMPLE",
+                "nested_record.level:VALUE",
+                nestedLevelFilter),
             buildArgsForPartition(
                 HUDI,
                 Arrays.asList(ICEBERG, DELTA),
                 "severity:SIMPLE",
                 "severity:VALUE",
-                severityFilter)),
-        Arguments.of(
+                severityFilter),
             buildArgsForPartition(
                 HUDI,
                 Arrays.asList(ICEBERG, DELTA),
                 "timestamp_micros_nullable_field:TIMESTAMP,level:SIMPLE",
                 "timestamp_micros_nullable_field:DAY:yyyy/MM/dd,level:VALUE",
                 timestampAndLevelFilter,
-                getAdditionalHudiReadOptions())));
+                getAdditionalHudiReadOptions()))
+        .flatMap(ITConversionController::withHudiTargetVersions);
+  }
+
+  /**
+   * Expands a partition-test case across both Hudi target versions (6 and 9) when Hudi is one of
+   * the target formats; otherwise yields the single case with no version override.
+   */
+  private static Stream<Arguments> withHudiTargetVersions(TableFormatPartitionDataHolder holder) {
+    if (holder.getTargetTableFormats().contains(HUDI)) {
+      return Stream.of(
+          Arguments.of(holder, HoodieTableVersion.SIX),
+          Arguments.of(holder, HoodieTableVersion.NINE));
+    }
+    return Stream.of(Arguments.of(holder, (HoodieTableVersion) null));
   }
 
   @ParameterizedTest
   @MethodSource("provideArgsForPartitionTesting")
-  public void testPartitionedData(TableFormatPartitionDataHolder tableFormatPartitionDataHolder) {
+  public void testPartitionedData(
+      TableFormatPartitionDataHolder tableFormatPartitionDataHolder,
+      HoodieTableVersion hudiTargetVersion) {
     String tableName = getTableName();
     String sourceTableFormat = tableFormatPartitionDataHolder.getSourceTableFormat();
     List<String> targetTableFormats = tableFormatPartitionDataHolder.getTargetTableFormats();
@@ -597,7 +712,8 @@ public class ITConversionController {
               table,
               targetTableFormats,
               xTablePartitionConfig,
-              null);
+              null,
+              hudiTargetVersion);
       tableToClose.insertRows(100);
       conversionController.sync(conversionConfig, conversionSourceProvider);
       // Do a second sync to force the test to read back the metadata it wrote earlier
@@ -1194,6 +1310,26 @@ public class ITConversionController {
       List<String> targetTableFormats,
       String partitionConfig,
       Duration metadataRetention) {
+    return getTableSyncConfig(
+        sourceTableFormat,
+        syncMode,
+        tableName,
+        table,
+        targetTableFormats,
+        partitionConfig,
+        metadataRetention,
+        null);
+  }
+
+  private static ConversionConfig getTableSyncConfig(
+      String sourceTableFormat,
+      SyncMode syncMode,
+      String tableName,
+      GenericTable table,
+      List<String> targetTableFormats,
+      String partitionConfig,
+      Duration metadataRetention,
+      HoodieTableVersion hudiTargetVersion) {
     Properties sourceProperties = new Properties();
     if (partitionConfig != null) {
       sourceProperties.put(PARTITION_FIELD_SPEC_CONFIG, partitionConfig);
@@ -1217,7 +1353,7 @@ public class ITConversionController {
                         // set the metadata path to the data path as the default (required by Hudi)
                         .basePath(table.getDataPath())
                         .metadataRetention(metadataRetention)
-                        .additionalProperties(new TypedProperties())
+                        .additionalProperties(hudiTargetProperties(formatName, hudiTargetVersion))
                         .build())
             .collect(Collectors.toList());
 
@@ -1227,4 +1363,18 @@ public class ITConversionController {
         .syncMode(syncMode)
         .build();
   }
+
+  /**
+   * Returns the additional properties for a target table, pinning the Hudi target table version
+   * when one is supplied (and the target is Hudi) so a single test can exercise both v6 and v9.
+   */
+  private static TypedProperties hudiTargetProperties(
+      String formatName, HoodieTableVersion hudiTargetVersion) {
+    TypedProperties properties = new TypedProperties();
+    if (HUDI.equals(formatName) && hudiTargetVersion != null) {
+      properties.setProperty(
+          HudiTargetConfig.HUDI_TABLE_VERSION, String.valueOf(hudiTargetVersion.versionCode()));
+    }
+    return properties;
+  }
 }
diff --git a/xtable-core/src/test/java/org/apache/xtable/TestAbstractHudiTable.java b/xtable-core/src/test/java/org/apache/xtable/TestAbstractHudiTable.java
index a5909a04..242b8580 100644
--- a/xtable-core/src/test/java/org/apache/xtable/TestAbstractHudiTable.java
+++ b/xtable-core/src/test/java/org/apache/xtable/TestAbstractHudiTable.java
@@ -142,6 +142,11 @@ public abstract class TestAbstractHudiTable
   protected KeyGenerator keyGenerator;
   protected Schema schema;
   protected List<String> partitionFieldNames;
+  // Hudi table format version used when creating the test table. Defaults to version 6 (legacy 0.x
+  // timeline layout / column-stats index V1) to match the historical behaviour; tests covering the
+  // Hudi 1.x layout (column-stats index V2) can opt into version 9. See
+  // https://github.com/apache/incubator-xtable/issues/834.
+  protected HoodieTableVersion tableVersion = HoodieTableVersion.SIX;
 
   TestAbstractHudiTable(String name, Schema schema, Path tempDir, String partitionConfig) {
     try {
@@ -441,10 +446,6 @@ public abstract class TestAbstractHudiTable
         HoodieStorageConfig.newBuilder().parquetCompressionCodec("UNCOMPRESSED").build();
     HoodieArchivalConfig archivalConfig =
         HoodieArchivalConfig.newBuilder().archiveCommitsWith(3, 4).build();
-    // Hudi 1.x MDT col-stats generation fails for array and map types, so only enable column
-    // stats when the schema does not contain those types.
-    // https://github.com/apache/incubator-xtable/issues/773
-    // boolean columnStatsSupported = !schemaContainsArrayOrMap(schema);
     HoodieMetadataConfig metadataConfig =
         HoodieMetadataConfig.newBuilder()
             .enable(true)
@@ -457,10 +458,9 @@ public abstract class TestAbstractHudiTable
         LockConfiguration.LOCK_ACQUIRE_CLIENT_RETRY_WAIT_TIME_IN_MILLIS_PROP_KEY, "3000");
     lockProperties.setProperty(LockConfiguration.LOCK_ACQUIRE_CLIENT_NUM_RETRIES_PROP_KEY, "20");
     return HoodieWriteConfig.newBuilder()
-        // Pin writes to table version 6 and disable auto-upgrade so the write client does not
-        // upgrade the test table to version 9. Table version 9 support will be added in a
-        // follow-up PR.
-        .withWriteTableVersion(HoodieTableVersion.SIX.versionCode())
+        // Write at the configured table version (default 6) and disable auto-upgrade so the write
+        // client does not migrate the test table to a different version.
+        .withWriteTableVersion(tableVersion.versionCode())
         .withAutoUpgradeVersion(false)
         .withProperties(keyGenProperties)
         .withPath(this.basePath)
@@ -629,9 +629,9 @@ public abstract class TestAbstractHudiTable
         .set(keyGenPropsMap)
         .setTableName(tableName)
         .setTableType(hoodieTableType)
-        // Pin test tables to table version 6 to match the conversion target. Table version 9
-        // support will be added in a follow-up PR.
-        .setTableVersion(HoodieTableVersion.SIX)
+        // Use the configured table version (default 6) so tests can exercise both the legacy and
+        // Hudi 1.x layouts.
+        .setTableVersion(tableVersion)
         .setKeyGeneratorClassProp(keyGenerator.getClass().getCanonicalName())
         .setPartitionFields(String.join(",", partitionFieldNames))
         .setRecordKeyFields(RECORD_KEY_FIELD_NAME)
diff --git a/xtable-core/src/test/java/org/apache/xtable/TestJavaHudiTable.java b/xtable-core/src/test/java/org/apache/xtable/TestJavaHudiTable.java
index 499ac08f..8e8d05c0 100644
--- a/xtable-core/src/test/java/org/apache/xtable/TestJavaHudiTable.java
+++ b/xtable-core/src/test/java/org/apache/xtable/TestJavaHudiTable.java
@@ -53,6 +53,7 @@ import org.apache.hudi.common.model.HoodieKey;
 import org.apache.hudi.common.model.HoodieRecord;
 import org.apache.hudi.common.model.HoodieTableType;
 import org.apache.hudi.common.table.HoodieTableMetaClient;
+import org.apache.hudi.common.table.HoodieTableVersion;
 import org.apache.hudi.common.util.Option;
 import org.apache.hudi.config.HoodieArchivalConfig;
 import org.apache.hudi.config.HoodieClusteringConfig;
@@ -89,6 +90,16 @@ public class TestJavaHudiTable extends TestAbstractHudiTable {
         tableName, BASIC_SCHEMA, tempDir, partitionConfig, tableType, null, false);
   }
 
+  public static TestJavaHudiTable forStandardSchema(
+      String tableName,
+      Path tempDir,
+      String partitionConfig,
+      HoodieTableType tableType,
+      HoodieTableVersion tableVersion) {
+    return new TestJavaHudiTable(
+        tableName, BASIC_SCHEMA, tempDir, partitionConfig, tableType, null, false, tableVersion);
+  }
+
   public static TestJavaHudiTable forStandardSchemaWithFieldIds(
       String tableName, Path tempDir, String partitionConfig, HoodieTableType tableType) {
     return new TestJavaHudiTable(
@@ -170,6 +181,17 @@ public class TestJavaHudiTable extends TestAbstractHudiTable {
         tableName, schema, tempDir, partitionConfig, tableType, null, false);
   }
 
+  public static TestJavaHudiTable withSchema(
+      String tableName,
+      Path tempDir,
+      String partitionConfig,
+      HoodieTableType tableType,
+      Schema schema,
+      HoodieTableVersion tableVersion) {
+    return new TestJavaHudiTable(
+        tableName, schema, tempDir, partitionConfig, tableType, null, false, tableVersion);
+  }
+
   private TestJavaHudiTable(
       String name,
       Schema schema,
@@ -178,7 +200,28 @@ public class TestJavaHudiTable extends TestAbstractHudiTable {
       HoodieTableType hoodieTableType,
       HoodieArchivalConfig archivalConfig,
       boolean addFieldIds) {
+    this(
+        name,
+        schema,
+        tempDir,
+        partitionConfig,
+        hoodieTableType,
+        archivalConfig,
+        addFieldIds,
+        HoodieTableVersion.SIX);
+  }
+
+  private TestJavaHudiTable(
+      String name,
+      Schema schema,
+      Path tempDir,
+      String partitionConfig,
+      HoodieTableType hoodieTableType,
+      HoodieArchivalConfig archivalConfig,
+      boolean addFieldIds,
+      HoodieTableVersion tableVersion) {
     super(name, schema, tempDir, partitionConfig);
+    this.tableVersion = tableVersion;
     this.conf = new Configuration();
     this.conf.set("parquet.avro.write-old-list-structure", "false");
     this.addFieldIds = addFieldIds;
@@ -202,6 +245,21 @@ public class TestJavaHudiTable extends TestAbstractHudiTable {
     return inserts;
   }
 
+  /**
+   * Writes the records for an already-started commit without finalizing it. Pair with {@link
+   * #commitInstant} to control completion order independently of the requested (instant) time, e.g.
+   * to reproduce out-of-order completion on table version 9.
+   */
+  public List<WriteStatus> bulkInsertWithoutCommit(
+      List<HoodieRecord<HoodieAvroPayload>> inserts, String commitInstant) {
+    return writeClient.bulkInsert(copyRecords(inserts), commitInstant);
+  }
+
+  public void commitInstant(String commitInstant, List<WriteStatus> writeStatuses) {
+    writeClient.commit(commitInstant, writeStatuses);
+    assertNoWriteErrors(writeStatuses);
+  }
+
   public List<HoodieRecord<HoodieAvroPayload>> upsertRecordsWithCommitAlreadyStarted(
       List<HoodieRecord<HoodieAvroPayload>> records,
       String commitInstant,
diff --git a/xtable-core/src/test/java/org/apache/xtable/TestSparkHudiTable.java b/xtable-core/src/test/java/org/apache/xtable/TestSparkHudiTable.java
index 6a6f1730..ebeef2e5 100644
--- a/xtable-core/src/test/java/org/apache/xtable/TestSparkHudiTable.java
+++ b/xtable-core/src/test/java/org/apache/xtable/TestSparkHudiTable.java
@@ -47,6 +47,7 @@ import org.apache.hudi.common.model.HoodieRecord;
 import org.apache.hudi.common.model.HoodieTableType;
 import org.apache.hudi.common.model.WriteOperationType;
 import org.apache.hudi.common.table.HoodieTableMetaClient;
+import org.apache.hudi.common.table.HoodieTableVersion;
 import org.apache.hudi.common.util.CommitUtils;
 import org.apache.hudi.common.util.Option;
 import org.apache.hudi.config.HoodieWriteConfig;
@@ -115,6 +116,17 @@ public class TestSparkHudiTable extends TestAbstractHudiTable {
         tableName, BASIC_SCHEMA, tempDir, jsc, partitionConfig, tableType);
   }
 
+  public static TestSparkHudiTable forStandardSchema(
+      String tableName,
+      Path tempDir,
+      JavaSparkContext jsc,
+      String partitionConfig,
+      HoodieTableType tableType,
+      HoodieTableVersion tableVersion) {
+    return new TestSparkHudiTable(
+        tableName, BASIC_SCHEMA, tempDir, jsc, partitionConfig, tableType, tableVersion);
+  }
+
   /**
    * Create a test table instance with a schema that has more fields than an instance returned by
    * {@link #forStandardSchema(String, Path, JavaSparkContext, String, HoodieTableType)}.
@@ -153,7 +165,20 @@ public class TestSparkHudiTable extends TestAbstractHudiTable {
       JavaSparkContext jsc,
       String partitionConfig,
       HoodieTableType hoodieTableType) {
+    this(name, schema, tempDir, jsc, partitionConfig, hoodieTableType, HoodieTableVersion.SIX);
+  }
+
+  private TestSparkHudiTable(
+      String name,
+      Schema schema,
+      Path tempDir,
+      JavaSparkContext jsc,
+      String partitionConfig,
+      HoodieTableType hoodieTableType,
+      HoodieTableVersion tableVersion) {
     super(name, schema, tempDir, partitionConfig);
+    // set the table version before initializing the write/meta clients, which read it
+    this.tableVersion = tableVersion;
     // initialize spark session
     this.jsc = jsc;
     this.writeClient = initSparkWriteClient(schema, typedProperties);
diff --git a/xtable-core/src/test/java/org/apache/xtable/hudi/HudiTestUtil.java b/xtable-core/src/test/java/org/apache/xtable/hudi/HudiTestUtil.java
index e64128e2..02543b69 100644
--- a/xtable-core/src/test/java/org/apache/xtable/hudi/HudiTestUtil.java
+++ b/xtable-core/src/test/java/org/apache/xtable/hudi/HudiTestUtil.java
@@ -53,15 +53,19 @@ import org.apache.hudi.stats.HoodieColumnRangeMetadata;
 @NoArgsConstructor(access = AccessLevel.PRIVATE)
 public class HudiTestUtil {
 
-  @SneakyThrows
   public static HoodieTableMetaClient initTableAndGetMetaClient(
       String tableBasePath, String partitionFields) {
+    // Table version 6 matches the conversion target's default version.
+    return initTableAndGetMetaClient(tableBasePath, partitionFields, HoodieTableVersion.SIX);
+  }
+
+  @SneakyThrows
+  public static HoodieTableMetaClient initTableAndGetMetaClient(
+      String tableBasePath, String partitionFields, HoodieTableVersion tableVersion) {
     return HoodieTableMetaClient.newTableBuilder()
         .setCommitTimezone(HoodieTimelineTimeZone.UTC)
         .setTableType(HoodieTableType.COPY_ON_WRITE)
-        // Pin test tables to table version 6 to match the conversion target. Table version 9
-        // support will be added in a follow-up PR.
-        .setTableVersion(HoodieTableVersion.SIX)
+        .setTableVersion(tableVersion)
         .setTableName("test_table")
         .setPayloadClass(HoodieAvroPayload.class)
         .setPartitionFields(partitionFields)
@@ -77,10 +81,9 @@ public class HudiTestUtil {
     Properties properties = new Properties();
     properties.setProperty(HoodieMetadataConfig.AUTO_INITIALIZE.key(), "false");
     return HoodieWriteConfig.newBuilder()
-        // Pin writes to table version 6 and disable auto-upgrade so the write client does not
-        // upgrade the test table to version 9. Table version 9 support will be added in a
-        // follow-up PR.
-        .withWriteTableVersion(HoodieTableVersion.SIX.versionCode())
+        // Write at the table's own version and disable auto-upgrade so the write client does not
+        // upgrade the test table, mirroring HudiConversionTarget.
+        .withWriteTableVersion(metaClient.getTableConfig().getTableVersion().versionCode())
         .withAutoUpgradeVersion(false)
         .withSchema(schema == null ? "" : schema.toString())
         .withIndexConfig(HoodieIndexConfig.newBuilder().withIndexType(INMEMORY).build())
@@ -90,8 +93,9 @@ public class HudiTestUtil {
             HoodieMetadataConfig.newBuilder()
                 .withMaxNumDeltaCommitsBeforeCompaction(2)
                 .enable(true)
-                // Mirror HudiConversionTarget: col-stats index only for un-partitioned tables.
-                .withMetadataIndexColumnStats(!metaClient.getTableConfig().isTablePartitioned())
+                // Mirror HudiConversionTarget: col stats for all tables, partition stats off.
+                .withMetadataIndexColumnStats(true)
+                .withMetadataIndexPartitionStats(false)
                 .withProperties(properties)
                 .build())
         .withArchivalConfig(HoodieArchivalConfig.newBuilder().archiveCommitsWith(1, 2).build())
diff --git a/xtable-core/src/test/java/org/apache/xtable/hudi/ITHudiConversionSource.java b/xtable-core/src/test/java/org/apache/xtable/hudi/ITHudiConversionSource.java
index 3046834b..83caa58e 100644
--- a/xtable-core/src/test/java/org/apache/xtable/hudi/ITHudiConversionSource.java
+++ b/xtable-core/src/test/java/org/apache/xtable/hudi/ITHudiConversionSource.java
@@ -21,7 +21,9 @@ package org.apache.xtable.hudi;
 import static java.util.stream.Collectors.groupingBy;
 import static org.apache.hudi.hadoop.fs.HadoopFSUtils.getStorageConf;
 import static org.apache.xtable.testutil.ITTestUtils.validateTable;
+import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertIterableEquals;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 import static org.junit.jupiter.api.Assertions.fail;
 
@@ -54,14 +56,17 @@ import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.io.TempDir;
 import org.junit.jupiter.params.ParameterizedTest;
 import org.junit.jupiter.params.provider.Arguments;
+import org.junit.jupiter.params.provider.EnumSource;
 import org.junit.jupiter.params.provider.MethodSource;
 
 import org.apache.hudi.client.HoodieReadClient;
+import org.apache.hudi.client.WriteStatus;
 import org.apache.hudi.common.fs.FSUtils;
 import org.apache.hudi.common.model.HoodieAvroPayload;
 import org.apache.hudi.common.model.HoodieRecord;
 import org.apache.hudi.common.model.HoodieTableType;
 import org.apache.hudi.common.table.HoodieTableMetaClient;
+import org.apache.hudi.common.table.HoodieTableVersion;
 import org.apache.hudi.common.table.timeline.HoodieInstant;
 
 import org.apache.xtable.GenericTable;
@@ -230,11 +235,13 @@ public class ITHudiConversionSource {
   @ParameterizedTest
   @MethodSource("testsForAllTableTypesAndPartitions")
   public void insertAndUpsertData(
-      HoodieTableType tableType, HudiTestUtil.PartitionConfig partitionConfig) {
+      HoodieTableType tableType,
+      HudiTestUtil.PartitionConfig partitionConfig,
+      HoodieTableVersion tableVersion) {
     String tableName = GenericTable.getTableName();
-    try (TestJavaHudiTable table =
-        TestJavaHudiTable.forStandardSchema(
-            tableName, tempDir, partitionConfig.getHudiConfig(), tableType)) {
+    try (TestSparkHudiTable table =
+        TestSparkHudiTable.forStandardSchema(
+            tableName, tempDir, jsc, partitionConfig.getHudiConfig(), tableType, tableVersion)) {
       List<List<String>> allBaseFilePaths = new ArrayList<>();
       List<TableChange> allTableChanges = new ArrayList<>();
 
@@ -284,14 +291,107 @@ public class ITHudiConversionSource {
     }
   }
 
+  /**
+   * On table version 9 (timeline layout V2) a commit becomes visible at its completion time. This
+   * test creates a commit whose requested (instant) time is older than a later commit but whose
+   * completion is newer (out-of-order completion) and verifies the incremental backlog still
+   * surfaces it. With the legacy requested-time selection the straggler would be skipped because
+   * its requested time precedes the checkpoint.
+   */
   @Test
-  public void testOnlyUpsertsAfterInserts() {
+  public void testIncrementalSyncWithOutOfOrderCompletionOnTableVersionNine() {
+    String tableName = GenericTable.getTableName();
+    try (TestJavaHudiTable table =
+        TestJavaHudiTable.forStandardSchema(
+            tableName, tempDir, null, HoodieTableType.COPY_ON_WRITE, HoodieTableVersion.NINE)) {
+      // Baseline commit that the incremental sync resumes from.
+      String baseInstant = table.startCommit();
+      table.insertRecordsWithCommitAlreadyStarted(table.generateRecords(20), baseInstant, true);
+
+      // "early" is requested first (smaller instant time) but completed last; "late" is requested
+      // second but completed first -> completion order is the reverse of requested order.
+      String earlyRequestedInstant = table.startCommit();
+      List<WriteStatus> earlyStatuses =
+          table.bulkInsertWithoutCommit(table.generateRecords(20), earlyRequestedInstant);
+      String lateRequestedInstant = table.startCommit();
+      List<WriteStatus> lateStatuses =
+          table.bulkInsertWithoutCommit(table.generateRecords(20), lateRequestedInstant);
+      table.commitInstant(lateRequestedInstant, lateStatuses);
+      table.commitInstant(earlyRequestedInstant, earlyStatuses);
+
+      HudiConversionSource hudiClient = getHudiSourceClient(CONFIGURATION, table.getBasePath(), "");
+
+      // Resume from the checkpoint a sync of the later-requested commit writes, which is its
+      // completion time on table version 9. Under requested-time selection the earlier-requested
+      // straggler (earlyRequestedInstant < lateRequestedInstant) would be dropped; completion-time
+      // selection must still return it.
+      InstantsForIncrementalSync instantsForIncrementalSync =
+          InstantsForIncrementalSync.builder()
+              .lastSyncInstant(getCompletionInstant(table.getMetaClient(), lateRequestedInstant))
+              .build();
+      CommitsBacklog<HoodieInstant> backlog =
+          hudiClient.getCommitsBacklog(instantsForIncrementalSync);
+      List<String> backlogInstants =
+          backlog.getCommitsToProcess().stream()
+              .map(HoodieInstant::requestedTime)
+              .collect(Collectors.toList());
+
+      assertEquals(
+          Collections.singletonList(earlyRequestedInstant),
+          backlogInstants,
+          "Out-of-order completed commit must be included in the incremental backlog");
+
+      // The current snapshot must reflect the most-recently-completed commit (the straggler), and
+      // its commit time is the straggler's completion time.
+      InternalSnapshot snapshot = hudiClient.getCurrentSnapshot();
+      assertEquals(
+          getCompletionInstant(table.getMetaClient(), earlyRequestedInstant),
+          snapshot.getTable().getLatestCommitTime());
+    }
+  }
+
+  /**
+   * Sanity check that ordinary in-order incremental sync on table version 9 returns every commit in
+   * completion-time order.
+   */
+  @Test
+  public void testIncrementalSyncOrderingOnTableVersionNine() {
+    String tableName = GenericTable.getTableName();
+    try (TestJavaHudiTable table =
+        TestJavaHudiTable.forStandardSchema(
+            tableName, tempDir, null, HoodieTableType.COPY_ON_WRITE, HoodieTableVersion.NINE)) {
+      String baseInstant = table.startCommit();
+      table.insertRecordsWithCommitAlreadyStarted(table.generateRecords(20), baseInstant, true);
+      String second = table.startCommit();
+      table.insertRecordsWithCommitAlreadyStarted(table.generateRecords(20), second, true);
+      String third = table.startCommit();
+      table.insertRecordsWithCommitAlreadyStarted(table.generateRecords(20), third, true);
+
+      HudiConversionSource hudiClient = getHudiSourceClient(CONFIGURATION, table.getBasePath(), "");
+      CommitsBacklog<HoodieInstant> backlog =
+          hudiClient.getCommitsBacklog(
+              InstantsForIncrementalSync.builder()
+                  .lastSyncInstant(HudiInstantUtils.parseFromInstantTime(baseInstant))
+                  .build());
+      assertIterableEquals(
+          Arrays.asList(second, third),
+          backlog.getCommitsToProcess().stream()
+              .map(HoodieInstant::requestedTime)
+              .collect(Collectors.toList()));
+    }
+  }
+
+  @ParameterizedTest
+  @EnumSource(
+      value = HoodieTableVersion.class,
+      names = {"SIX", "NINE"})
+  public void testOnlyUpsertsAfterInserts(HoodieTableVersion tableVersion) {
     HoodieTableType tableType = HoodieTableType.MERGE_ON_READ;
     HudiTestUtil.PartitionConfig partitionConfig = HudiTestUtil.PartitionConfig.of(null, null);
     String tableName = "test_table_" + UUID.randomUUID();
-    try (TestJavaHudiTable table =
-        TestJavaHudiTable.forStandardSchema(
-            tableName, tempDir, partitionConfig.getHudiConfig(), tableType)) {
+    try (TestSparkHudiTable table =
+        TestSparkHudiTable.forStandardSchema(
+            tableName, tempDir, jsc, partitionConfig.getHudiConfig(), tableType, tableVersion)) {
       List<List<String>> allBaseFilePaths = new ArrayList<>();
       List<TableChange> allTableChanges = new ArrayList<>();
 
@@ -332,14 +432,17 @@ public class ITHudiConversionSource {
     }
   }
 
-  @Test
-  public void testForIncrementalSyncSafetyCheck() {
+  @ParameterizedTest
+  @EnumSource(
+      value = HoodieTableVersion.class,
+      names = {"SIX", "NINE"})
+  public void testForIncrementalSyncSafetyCheck(HoodieTableVersion tableVersion) {
     HoodieTableType tableType = HoodieTableType.COPY_ON_WRITE;
     HudiTestUtil.PartitionConfig partitionConfig = HudiTestUtil.PartitionConfig.of(null, null);
     String tableName = GenericTable.getTableName();
-    try (TestJavaHudiTable table =
-        TestJavaHudiTable.forStandardSchema(
-            tableName, tempDir, partitionConfig.getHudiConfig(), tableType)) {
+    try (TestSparkHudiTable table =
+        TestSparkHudiTable.forStandardSchema(
+            tableName, tempDir, jsc, partitionConfig.getHudiConfig(), tableType, tableVersion)) {
       String commitInstant1 = table.startCommit();
       List<HoodieRecord<HoodieAvroPayload>> insertsForCommit1 = table.generateRecords(100);
       table.insertRecordsWithCommitAlreadyStarted(insertsForCommit1, commitInstant1, true);
@@ -365,6 +468,15 @@ public class ITHudiConversionSource {
       assertTrue(
           hudiClient.isIncrementalSyncSafeFrom(
               HudiInstantUtils.parseFromInstantTime(commitInstant2)));
+      if (tableVersion == HoodieTableVersion.NINE) {
+        // On table version 9 the sync checkpoint is the completion time of the synced commit.
+        assertFalse(
+            hudiClient.isIncrementalSyncSafeFrom(
+                getCompletionInstant(table.getMetaClient(), commitInstant1)));
+        assertTrue(
+            hudiClient.isIncrementalSyncSafeFrom(
+                getCompletionInstant(table.getMetaClient(), commitInstant2)));
+      }
       // commit older by an hour is not present in table, hence not safe for incremental sync.
       Instant instantAsOfHourAgo = Instant.now().minus(1, ChronoUnit.HOURS);
       assertFalse(hudiClient.isIncrementalSyncSafeFrom(instantAsOfHourAgo));
@@ -373,10 +485,11 @@ public class ITHudiConversionSource {
 
   @ParameterizedTest
   @MethodSource("testsForAllTableTypes")
-  public void testsForDropPartition(HoodieTableType tableType) {
+  public void testsForDropPartition(HoodieTableType tableType, HoodieTableVersion tableVersion) {
     String tableName = "test_table_" + UUID.randomUUID();
     try (TestSparkHudiTable table =
-        TestSparkHudiTable.forStandardSchema(tableName, tempDir, jsc, "level:SIMPLE", tableType)) {
+        TestSparkHudiTable.forStandardSchema(
+            tableName, tempDir, jsc, "level:SIMPLE", tableType, tableVersion)) {
       List<List<String>> allBaseFilePaths = new ArrayList<>();
       List<TableChange> allTableChanges = new ArrayList<>();
 
@@ -422,10 +535,12 @@ public class ITHudiConversionSource {
 
   @ParameterizedTest
   @MethodSource("testsForAllTableTypes")
-  public void testMultipleInsertOverwriteOnSamePartitions(HoodieTableType tableType) {
+  public void testMultipleInsertOverwriteOnSamePartitions(
+      HoodieTableType tableType, HoodieTableVersion tableVersion) {
     String tableName = "test_table_" + UUID.randomUUID();
     try (TestSparkHudiTable table =
-        TestSparkHudiTable.forStandardSchema(tableName, tempDir, jsc, "level:SIMPLE", tableType)) {
+        TestSparkHudiTable.forStandardSchema(
+            tableName, tempDir, jsc, "level:SIMPLE", tableType, tableVersion)) {
       List<List<String>> allBaseFilePaths = new ArrayList<>();
       List<TableChange> allTableChanges = new ArrayList<>();
 
@@ -470,10 +585,12 @@ public class ITHudiConversionSource {
 
   @ParameterizedTest
   @MethodSource("testsForAllTableTypes")
-  public void testsForDeleteAllRecordsInPartition(HoodieTableType tableType) {
+  public void testsForDeleteAllRecordsInPartition(
+      HoodieTableType tableType, HoodieTableVersion tableVersion) {
     String tableName = "test_table_" + UUID.randomUUID();
     try (TestSparkHudiTable table =
-        TestSparkHudiTable.forStandardSchema(tableName, tempDir, jsc, "level:SIMPLE", tableType)) {
+        TestSparkHudiTable.forStandardSchema(
+            tableName, tempDir, jsc, "level:SIMPLE", tableType, tableVersion)) {
       List<List<String>> allBaseFilePaths = new ArrayList<>();
       List<TableChange> allTableChanges = new ArrayList<>();
 
@@ -523,11 +640,13 @@ public class ITHudiConversionSource {
   @ParameterizedTest
   @MethodSource("testsForAllTableTypesAndPartitions")
   public void testsForClustering(
-      HoodieTableType tableType, HudiTestUtil.PartitionConfig partitionConfig) {
+      HoodieTableType tableType,
+      HudiTestUtil.PartitionConfig partitionConfig,
+      HoodieTableVersion tableVersion) {
     String tableName = "test_table_" + UUID.randomUUID();
-    try (TestJavaHudiTable table =
-        TestJavaHudiTable.forStandardSchema(
-            tableName, tempDir, partitionConfig.getHudiConfig(), tableType)) {
+    try (TestSparkHudiTable table =
+        TestSparkHudiTable.forStandardSchema(
+            tableName, tempDir, jsc, partitionConfig.getHudiConfig(), tableType, tableVersion)) {
       List<List<String>> allBaseFilePaths = new ArrayList<>();
       List<TableChange> allTableChanges = new ArrayList<>();
 
@@ -590,11 +709,13 @@ public class ITHudiConversionSource {
   @ParameterizedTest
   @MethodSource("testsForAllTableTypesAndPartitions")
   public void testsForSavepointRestore(
-      HoodieTableType tableType, HudiTestUtil.PartitionConfig partitionConfig) {
+      HoodieTableType tableType,
+      HudiTestUtil.PartitionConfig partitionConfig,
+      HoodieTableVersion tableVersion) {
     String tableName = "test_table_" + UUID.randomUUID();
-    try (TestJavaHudiTable table =
-        TestJavaHudiTable.forStandardSchema(
-            tableName, tempDir, partitionConfig.getHudiConfig(), tableType)) {
+    try (TestSparkHudiTable table =
+        TestSparkHudiTable.forStandardSchema(
+            tableName, tempDir, jsc, partitionConfig.getHudiConfig(), tableType, tableVersion)) {
       List<List<String>> allBaseFilePaths = new ArrayList<>();
       List<TableChange> allTableChanges = new ArrayList<>();
 
@@ -657,11 +778,13 @@ public class ITHudiConversionSource {
   @ParameterizedTest
   @MethodSource("testsForAllTableTypesAndPartitions")
   public void testsForRollbacks(
-      HoodieTableType tableType, HudiTestUtil.PartitionConfig partitionConfig) {
+      HoodieTableType tableType,
+      HudiTestUtil.PartitionConfig partitionConfig,
+      HoodieTableVersion tableVersion) {
     String tableName = "test_table_" + UUID.randomUUID();
-    try (TestJavaHudiTable table =
-        TestJavaHudiTable.forStandardSchema(
-            tableName, tempDir, partitionConfig.getHudiConfig(), tableType)) {
+    try (TestSparkHudiTable table =
+        TestSparkHudiTable.forStandardSchema(
+            tableName, tempDir, jsc, partitionConfig.getHudiConfig(), tableType, tableVersion)) {
 
       String commitInstant1 = table.startCommit();
       List<HoodieRecord<HoodieAvroPayload>> insertsForCommit1 = table.generateRecords(50);
@@ -717,9 +840,23 @@ public class ITHudiConversionSource {
     }
   }
 
+  private static Instant getCompletionInstant(
+      HoodieTableMetaClient metaClient, String requestedInstant) {
+    return metaClient.reloadActiveTimeline().filterCompletedInstants().getInstants().stream()
+        .filter(instant -> instant.requestedTime().equals(requestedInstant))
+        .map(instant -> HudiInstantUtils.parseFromInstantTime(instant.getCompletionTime()))
+        .findFirst()
+        .orElseThrow(() -> new IllegalStateException("No completed instant " + requestedInstant));
+  }
+
   private static Stream<Arguments> testsForAllTableTypes() {
-    return Stream.of(
-        Arguments.of(HoodieTableType.COPY_ON_WRITE), Arguments.of(HoodieTableType.MERGE_ON_READ));
+    List<HoodieTableType> tableTypes =
+        Arrays.asList(HoodieTableType.COPY_ON_WRITE, HoodieTableType.MERGE_ON_READ);
+    List<HoodieTableVersion> tableVersions =
+        Arrays.asList(HoodieTableVersion.SIX, HoodieTableVersion.NINE);
+    return tableTypes.stream()
+        .flatMap(
+            tableType -> tableVersions.stream().map(version -> Arguments.of(tableType, version)));
   }
 
   private static Stream<Arguments> testsForAllTableTypesAndPartitions() {
@@ -730,10 +867,17 @@ public class ITHudiConversionSource {
         Arrays.asList(unPartitionedConfig, partitionedConfig);
     List<HoodieTableType> tableTypes =
         Arrays.asList(HoodieTableType.COPY_ON_WRITE, HoodieTableType.MERGE_ON_READ);
+    List<HoodieTableVersion> tableVersions =
+        Arrays.asList(HoodieTableVersion.SIX, HoodieTableVersion.NINE);
 
     return tableTypes.stream()
         .flatMap(
-            tableType -> partitionConfigs.stream().map(config -> Arguments.of(tableType, config)));
+            tableType ->
+                partitionConfigs.stream()
+                    .flatMap(
+                        config ->
+                            tableVersions.stream()
+                                .map(version -> Arguments.of(tableType, config, version))));
   }
 
   private HudiConversionSource getHudiSourceClient(
diff --git a/xtable-core/src/test/java/org/apache/xtable/hudi/ITHudiConversionTarget.java b/xtable-core/src/test/java/org/apache/xtable/hudi/ITHudiConversionTarget.java
index b0f2b87a..64d5e9ca 100644
--- a/xtable-core/src/test/java/org/apache/xtable/hudi/ITHudiConversionTarget.java
+++ b/xtable-core/src/test/java/org/apache/xtable/hudi/ITHudiConversionTarget.java
@@ -40,6 +40,7 @@ import java.util.Optional;
 import java.util.TimeZone;
 import java.util.UUID;
 import java.util.stream.Collectors;
+import java.util.stream.Stream;
 
 import lombok.SneakyThrows;
 
@@ -51,7 +52,9 @@ import org.junit.jupiter.api.BeforeAll;
 import org.junit.jupiter.api.io.TempDir;
 import org.junit.jupiter.api.parallel.Execution;
 import org.junit.jupiter.params.ParameterizedTest;
-import org.junit.jupiter.params.provider.ValueSource;
+import org.junit.jupiter.params.provider.Arguments;
+import org.junit.jupiter.params.provider.EnumSource;
+import org.junit.jupiter.params.provider.MethodSource;
 
 import org.apache.hudi.avro.model.HoodieMetadataColumnStats;
 import org.apache.hudi.avro.model.StringWrapper;
@@ -66,6 +69,7 @@ import org.apache.hudi.common.model.HoodieRecord;
 import org.apache.hudi.common.model.HoodieTimelineTimeZone;
 import org.apache.hudi.common.model.WriteOperationType;
 import org.apache.hudi.common.table.HoodieTableMetaClient;
+import org.apache.hudi.common.table.HoodieTableVersion;
 import org.apache.hudi.common.table.TableSchemaResolver;
 import org.apache.hudi.common.table.timeline.HoodieInstant;
 import org.apache.hudi.common.table.timeline.HoodieInstantTimeGenerator;
@@ -151,13 +155,14 @@ public class ITHudiConversionTarget {
   }
 
   @ParameterizedTest
-  @ValueSource(booleans = {true, false})
-  void syncForExistingTable(boolean partitioned) {
+  @MethodSource("partitionedAndVersion")
+  void syncForExistingTable(boolean partitioned, HoodieTableVersion tableVersion) {
     String partitionPath = partitioned ? "partition_path" : "";
     String commitTime = "20231003013807542";
     String existingFileName1 = "existing_file_1.parquet";
     HoodieTableMetaClient setupMetaClient =
-        initTableAndGetMetaClient(tableBasePath, partitioned ? PARTITION_FIELD_NAME : "");
+        initTableAndGetMetaClient(
+            tableBasePath, partitioned ? PARTITION_FIELD_NAME : "", tableVersion);
     // initialize the table with only 2 of the 3 fields
     Schema initialSchema =
         SchemaBuilder.record(TEST_SCHEMA_NAME)
@@ -211,7 +216,7 @@ public class ITHudiConversionTarget {
             .fileRemoved(fileToRemove)
             .build();
     // perform sync
-    HudiConversionTarget targetClient = getTargetClient();
+    HudiConversionTarget targetClient = getTargetClient(tableVersion);
     InternalTable initialState = getState(Instant.now(), partitioned);
     targetClient.beginSync(initialState);
     targetClient.syncFilesForDiff(internalFilesDiff);
@@ -226,24 +231,24 @@ public class ITHudiConversionTarget {
         HoodieTableMetaClient.builder().setConf(CONFIGURATION).setBasePath(tableBasePath).build();
     assertFileGroupCorrectness(
         metaClient, partitionPath, Collections.singletonList(Pair.of(fileName, filePath)));
-    if (!partitioned) {
-      try (HoodieBackedTableMetadata hoodieBackedTableMetadata =
-          new HoodieBackedTableMetadata(
-              CONTEXT,
-              metaClient.getStorage(),
-              writeConfig.getMetadataConfig(),
-              tableBasePath,
-              true)) {
-        assertColStats(hoodieBackedTableMetadata, partitionPath, fileName);
-      }
+    try (HoodieBackedTableMetadata hoodieBackedTableMetadata =
+        new HoodieBackedTableMetadata(
+            CONTEXT,
+            metaClient.getStorage(),
+            writeConfig.getMetadataConfig(),
+            tableBasePath,
+            true)) {
+      assertColStats(hoodieBackedTableMetadata, partitionPath, fileName);
     }
     // include meta fields since the table was created with meta fields enabled
     assertSchema(metaClient, true);
+    // the sync must keep the existing table at its version
+    assertEquals(tableVersion, metaClient.getTableConfig().getTableVersion());
   }
 
   @ParameterizedTest
-  @ValueSource(booleans = {true, false})
-  void syncForNewTable(boolean partitioned) {
+  @MethodSource("partitionedAndVersion")
+  void syncForNewTable(boolean partitioned, HoodieTableVersion tableVersion) {
     String partitionPath = partitioned ? "partition_path" : "";
     String fileName = "file_1.parquet";
     String filePath = getFilePath(partitionPath, fileName);
@@ -260,7 +265,7 @@ public class ITHudiConversionTarget {
                 .build());
     // sync snapshot and metadata
     InternalTable initialState = getState(Instant.now(), partitioned);
-    HudiConversionTarget targetClient = getTargetClient();
+    HudiConversionTarget targetClient = getTargetClient(tableVersion);
     targetClient.beginSync(initialState);
     targetClient.syncFilesForSnapshot(snapshot);
     TableSyncMetadata latestState =
@@ -274,23 +279,24 @@ public class ITHudiConversionTarget {
         HoodieTableMetaClient.builder().setConf(CONFIGURATION).setBasePath(tableBasePath).build();
     assertFileGroupCorrectness(
         metaClient, partitionPath, Collections.singletonList(Pair.of(fileName, filePath)));
-    if (!partitioned) {
-      try (HoodieBackedTableMetadata hoodieBackedTableMetadata =
-          new HoodieBackedTableMetadata(
-              CONTEXT,
-              metaClient.getStorage(),
-              getHoodieWriteConfig(metaClient).getMetadataConfig(),
-              tableBasePath,
-              true)) {
-        assertColStats(hoodieBackedTableMetadata, partitionPath, fileName);
-      }
+    try (HoodieBackedTableMetadata hoodieBackedTableMetadata =
+        new HoodieBackedTableMetadata(
+            CONTEXT,
+            metaClient.getStorage(),
+            getHoodieWriteConfig(metaClient).getMetadataConfig(),
+            tableBasePath,
+            true)) {
+      assertColStats(hoodieBackedTableMetadata, partitionPath, fileName);
     }
     assertSchema(metaClient, false);
   }
 
   @ParameterizedTest
-  @ValueSource(booleans = {true, false})
-  void archiveTimelineAndCleanMetadataTableAfterMultipleCommits(boolean partitioned) {
+  @EnumSource(
+      value = HoodieTableVersion.class,
+      names = {"SIX", "NINE"})
+  void archiveTimelineAndCleanMetadataTableAfterMultipleCommits(HoodieTableVersion tableVersion) {
+    boolean partitioned = true;
     String partitionPath = partitioned ? "partition_path" : "";
     String fileName0 = "file_0.parquet";
     String filePath0 = getFilePath(partitionPath, fileName0);
@@ -313,7 +319,7 @@ public class ITHudiConversionTarget {
                 .build());
     // sync snapshot and metadata
     InternalTable initialState = getState(Instant.now().minus(24, ChronoUnit.HOURS), partitioned);
-    HudiConversionTarget targetClient = getTargetClient();
+    HudiConversionTarget targetClient = getTargetClient(tableVersion);
     targetClient.beginSync(initialState);
     targetClient.syncFilesForSnapshot(snapshot);
     TableSyncMetadata latestState =
@@ -328,16 +334,14 @@ public class ITHudiConversionTarget {
     Pair<String, String> file0Pair = Pair.of(fileName0, filePath0);
     assertFileGroupCorrectness(
         metaClient, partitionPath, Arrays.asList(file0Pair, Pair.of(fileName1, filePath1)));
-    if (!partitioned) {
-      try (HoodieBackedTableMetadata hoodieBackedTableMetadata =
-          new HoodieBackedTableMetadata(
-              CONTEXT,
-              metaClient.getStorage(),
-              getHoodieWriteConfig(metaClient).getMetadataConfig(),
-              tableBasePath,
-              true)) {
-        assertColStats(hoodieBackedTableMetadata, partitionPath, fileName1);
-      }
+    try (HoodieBackedTableMetadata hoodieBackedTableMetadata =
+        new HoodieBackedTableMetadata(
+            CONTEXT,
+            metaClient.getStorage(),
+            getHoodieWriteConfig(metaClient).getMetadataConfig(),
+            tableBasePath,
+            true)) {
+      assertColStats(hoodieBackedTableMetadata, partitionPath, fileName1);
     }
 
     // create a new commit that removes fileName1 and adds fileName2
@@ -353,19 +357,17 @@ public class ITHudiConversionTarget {
 
     assertFileGroupCorrectness(
         metaClient, partitionPath, Arrays.asList(file0Pair, Pair.of(fileName2, filePath2)));
-    if (!partitioned) {
-      try (HoodieBackedTableMetadata hoodieBackedTableMetadata =
-          new HoodieBackedTableMetadata(
-              CONTEXT,
-              metaClient.getStorage(),
-              getHoodieWriteConfig(metaClient).getMetadataConfig(),
-              tableBasePath,
-              true)) {
-        // the metadata for fileName1 should still be present until the cleaner kicks in
-        assertColStats(hoodieBackedTableMetadata, partitionPath, fileName1);
-        // new file stats should be present
-        assertColStats(hoodieBackedTableMetadata, partitionPath, fileName2);
-      }
+    try (HoodieBackedTableMetadata hoodieBackedTableMetadata =
+        new HoodieBackedTableMetadata(
+            CONTEXT,
+            metaClient.getStorage(),
+            getHoodieWriteConfig(metaClient).getMetadataConfig(),
+            tableBasePath,
+            true)) {
+      // the metadata for fileName1 should still be present until the cleaner kicks in
+      assertColStats(hoodieBackedTableMetadata, partitionPath, fileName1);
+      // new file stats should be present
+      assertColStats(hoodieBackedTableMetadata, partitionPath, fileName2);
     }
 
     // create a new commit that removes fileName2 and adds fileName3
@@ -413,18 +415,16 @@ public class ITHudiConversionTarget {
             Pair.of(fileName4, filePath4),
             Pair.of(fileName5, filePath5)));
     // col stats should be cleaned up for fileName1 but present for fileName2 and fileName3
-    if (!partitioned) {
-      try (HoodieBackedTableMetadata hoodieBackedTableMetadata =
-          new HoodieBackedTableMetadata(
-              CONTEXT,
-              metaClient.getStorage(),
-              getHoodieWriteConfig(metaClient).getMetadataConfig(),
-              tableBasePath,
-              true)) {
-        // assertEmptyColStats(hoodieBackedTableMetadata, partitionPath, fileName1);
-        assertColStats(hoodieBackedTableMetadata, partitionPath, fileName3);
-        assertColStats(hoodieBackedTableMetadata, partitionPath, fileName4);
-      }
+    try (HoodieBackedTableMetadata hoodieBackedTableMetadata =
+        new HoodieBackedTableMetadata(
+            CONTEXT,
+            metaClient.getStorage(),
+            getHoodieWriteConfig(metaClient).getMetadataConfig(),
+            tableBasePath,
+            true)) {
+      // assertEmptyColStats(hoodieBackedTableMetadata, partitionPath, fileName1);
+      assertColStats(hoodieBackedTableMetadata, partitionPath, fileName3);
+      assertColStats(hoodieBackedTableMetadata, partitionPath, fileName4);
     }
     // the first commit to the timeline should be archived
     assertEquals(
@@ -432,8 +432,9 @@ public class ITHudiConversionTarget {
   }
 
   @ParameterizedTest
-  @ValueSource(booleans = {true, false})
-  void testSourceTargetMappingWithSnapshotAndIncrementalSync(boolean partitioned) {
+  @MethodSource("partitionedAndVersion")
+  void testSourceTargetMappingWithSnapshotAndIncrementalSync(
+      boolean partitioned, HoodieTableVersion tableVersion) {
     String partitionPath = partitioned ? "partition_path" : "";
     // Step 1: Initialize Test Files for Initial Snapshot
     String fileName0 = "file_0.parquet";
@@ -456,7 +457,7 @@ public class ITHudiConversionTarget {
 
     // Step 2: Sync Initial Snapshot
     InternalTable initialState = getState(Instant.now().minus(24, ChronoUnit.HOURS), partitioned);
-    HudiConversionTarget targetClient = getTargetClient();
+    HudiConversionTarget targetClient = getTargetClient(tableVersion);
     targetClient.beginSync(initialState);
     targetClient.syncFilesForSnapshot(initialSnapshot);
     TableSyncMetadata latestState =
@@ -522,8 +523,9 @@ public class ITHudiConversionTarget {
   }
 
   @ParameterizedTest
-  @ValueSource(booleans = {true, false})
-  void testGetTargetCommitIdentifierWithNullSourceIdentifier(boolean partitioned) {
+  @MethodSource("partitionedAndVersion")
+  void testGetTargetCommitIdentifierWithNullSourceIdentifier(
+      boolean partitioned, HoodieTableVersion tableVersion) {
     String partitionPath = partitioned ? "partition_path" : "";
     // Initialize Test Files and Snapshot
     String fileName0 = "file_0.parquet";
@@ -544,7 +546,7 @@ public class ITHudiConversionTarget {
                             .build()))
                 .build());
     InternalTable internalTable = getState(Instant.now().minus(24, ChronoUnit.HOURS), partitioned);
-    HudiConversionTarget targetClient = getTargetClient();
+    HudiConversionTarget targetClient = getTargetClient(tableVersion);
 
     targetClient.beginSync(internalTable);
     targetClient.syncFilesForSnapshot(initialSnapshot);
@@ -785,14 +787,26 @@ public class ITHudiConversionTarget {
     return builder.build();
   }
 
-  private HudiConversionTarget getTargetClient() {
+  /** Cross-product of the partitioned flag with the supported Hudi table versions (6 and 9). */
+  private static Stream<Arguments> partitionedAndVersion() {
+    return Stream.of(
+        Arguments.of(true, HoodieTableVersion.SIX),
+        Arguments.of(false, HoodieTableVersion.SIX),
+        Arguments.of(true, HoodieTableVersion.NINE),
+        Arguments.of(false, HoodieTableVersion.NINE));
+  }
+
+  private HudiConversionTarget getTargetClient(HoodieTableVersion tableVersion) {
+    TypedProperties properties = new TypedProperties();
+    properties.setProperty(
+        HudiTargetConfig.HUDI_TABLE_VERSION, String.valueOf(tableVersion.versionCode()));
     return new HudiConversionTarget(
         TargetTable.builder()
             .basePath(tableBasePath)
             .formatName(TableFormat.HUDI)
             .name("test_table")
             .metadataRetention(Duration.of(4, ChronoUnit.HOURS))
-            .additionalProperties(new TypedProperties())
+            .additionalProperties(properties)
             .build(),
         (Configuration) CONFIGURATION.unwrapCopy(),
         3);
diff --git a/xtable-core/src/test/java/org/apache/xtable/hudi/TestBaseFileUpdatesExtractor.java b/xtable-core/src/test/java/org/apache/xtable/hudi/TestBaseFileUpdatesExtractor.java
index 186ef1e0..67b2d9b4 100644
--- a/xtable-core/src/test/java/org/apache/xtable/hudi/TestBaseFileUpdatesExtractor.java
+++ b/xtable-core/src/test/java/org/apache/xtable/hudi/TestBaseFileUpdatesExtractor.java
@@ -35,6 +35,7 @@ import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
+import java.util.Optional;
 import java.util.UUID;
 import java.util.concurrent.atomic.AtomicLong;
 import java.util.function.Function;
@@ -56,6 +57,7 @@ import org.apache.hudi.common.table.HoodieTableVersion;
 import org.apache.hudi.common.table.timeline.HoodieInstant;
 import org.apache.hudi.common.table.timeline.HoodieTimeline;
 import org.apache.hudi.common.table.timeline.versioning.v2.InstantComparatorV2;
+import org.apache.hudi.common.util.ExternalFilePathUtil;
 import org.apache.hudi.common.util.Option;
 import org.apache.hudi.config.HoodieWriteConfig;
 import org.apache.hudi.hadoop.fs.CachingPath;
@@ -166,6 +168,72 @@ public class TestBaseFileUpdatesExtractor {
     assertWriteStatusesEquivalent(expectedWriteStatuses, replaceMetadata.getWriteStatuses());
   }
 
+  @Test
+  void convertDiffWithPartitionSubdirectory() {
+    String tableBasePath = "file://base";
+    // a Paimon-style file in a partition and in an unpartitioned table
+    InternalDataFile partitionedFile =
+        createFile(tableBasePath + "/partition1/bucket-0/file1.parquet", Collections.emptyList())
+            .toBuilder()
+            .partitionSubdirectory(Optional.of("bucket-0"))
+            .build();
+    InternalDataFile unpartitionedFile =
+        createFile(tableBasePath + "/bucket-1/file2.parquet", Collections.emptyList()).toBuilder()
+            .partitionSubdirectory(Optional.of("bucket-1"))
+            .build();
+    InternalDataFile removedFile =
+        createFile(tableBasePath + "/partition1/bucket-0/file3.parquet", Collections.emptyList())
+            .toBuilder()
+            .partitionSubdirectory(Optional.of("bucket-0"))
+            .build();
+    // without a prefix, a bucket-N directory is a partition value
+    InternalDataFile bucketPartitionFile =
+        createFile(tableBasePath + "/bucket-3/file4.parquet", Collections.emptyList());
+
+    InternalFilesDiff diff =
+        InternalFilesDiff.builder()
+            .filesAdded(Arrays.asList(partitionedFile, unpartitionedFile, bucketPartitionFile))
+            .filesRemoved(Collections.singletonList(removedFile))
+            .build();
+    BaseFileUpdatesExtractor.ReplaceMetadata replaceMetadata =
+        BaseFileUpdatesExtractor.of(CONTEXT, new CachingPath(tableBasePath))
+            .convertDiff(diff, COMMIT_TIME, HoodieIndexVersion.V1);
+
+    assertEquals(
+        Collections.singletonMap("partition1", Collections.singletonList("bucket-0/file3.parquet")),
+        replaceMetadata.getPartitionToReplacedFileIds());
+    Map<String, HoodieDeltaWriteStat> statsByFileId =
+        replaceMetadata.getWriteStatuses().stream()
+            .collect(
+                Collectors.toMap(
+                    WriteStatus::getFileId, status -> (HoodieDeltaWriteStat) status.getStat()));
+    assertEquals(3, statsByFileId.size());
+    assertWriteStat(
+        statsByFileId.get("bucket-0/file1.parquet"),
+        "partition1",
+        "partition1/bucket-0/"
+            + ExternalFilePathUtil.appendCommitTimeAndExternalFileMarker(
+                "file1.parquet", COMMIT_TIME, "bucket-0"));
+    assertWriteStat(
+        statsByFileId.get("bucket-1/file2.parquet"),
+        "",
+        "bucket-1/"
+            + ExternalFilePathUtil.appendCommitTimeAndExternalFileMarker(
+                "file2.parquet", COMMIT_TIME, "bucket-1"));
+    assertWriteStat(
+        statsByFileId.get("file4.parquet"),
+        "bucket-3",
+        ExternalFilePathUtil.appendCommitTimeAndExternalFileMarker(
+            "bucket-3/file4.parquet", COMMIT_TIME));
+  }
+
+  private static void assertWriteStat(
+      HoodieDeltaWriteStat writeStat, String expectedPartitionPath, String expectedPath) {
+    assertNotNull(writeStat);
+    assertEquals(expectedPartitionPath, writeStat.getPartitionPath());
+    assertEquals(expectedPath, writeStat.getPath());
+  }
+
   private void assertEqualsIgnoreOrder(
       Map<String, List<String>> expected, Map<String, List<String>> actual) {
     for (Map.Entry<String, List<String>> entry : expected.entrySet()) {
diff --git a/xtable-core/src/test/java/org/apache/xtable/hudi/TestHudiConversionSource.java b/xtable-core/src/test/java/org/apache/xtable/hudi/TestHudiConversionSource.java
index 6557a190..ce643d50 100644
--- a/xtable-core/src/test/java/org/apache/xtable/hudi/TestHudiConversionSource.java
+++ b/xtable-core/src/test/java/org/apache/xtable/hudi/TestHudiConversionSource.java
@@ -32,11 +32,13 @@ import java.util.Collections;
 import java.util.HashMap;
 
 import org.apache.hadoop.conf.Configuration;
-import org.junit.jupiter.api.Test;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.EnumSource;
 
 import org.apache.hudi.avro.model.HoodieCleanMetadata;
 import org.apache.hudi.common.table.HoodieTableConfig;
 import org.apache.hudi.common.table.HoodieTableMetaClient;
+import org.apache.hudi.common.table.HoodieTableVersion;
 import org.apache.hudi.common.table.timeline.HoodieActiveTimeline;
 import org.apache.hudi.common.table.timeline.HoodieInstant;
 import org.apache.hudi.common.table.timeline.HoodieTimeline;
@@ -56,9 +58,12 @@ class TestHudiConversionSource {
         .build();
   }
 
-  @Test
-  void testIsIncrementalSyncSafeFromWithNullEarliestCommitToRetainNoCleanInstants()
-      throws Exception {
+  @ParameterizedTest
+  @EnumSource(
+      value = HoodieTableVersion.class,
+      names = {"SIX", "NINE"})
+  void testIsIncrementalSyncSafeFromWithNullEarliestCommitToRetainNoCleanInstants(
+      HoodieTableVersion tableVersion) throws Exception {
     HoodieTableMetaClient mockMetaClient = mock(HoodieTableMetaClient.class);
     HoodieActiveTimeline mockActiveTimeline = mock(HoodieActiveTimeline.class);
     HoodieTimeline mockCleanerTimeline = mock(HoodieTimeline.class);
@@ -71,6 +76,7 @@ class TestHudiConversionSource {
     when(mockMetaClient.getActiveTimeline()).thenReturn(mockActiveTimeline);
     when(mockMetaClient.getTableConfig()).thenReturn(mockTableConfig);
     when(mockTableConfig.isMetadataTableAvailable()).thenReturn(false);
+    when(mockTableConfig.getTableVersion()).thenReturn(tableVersion);
     doReturn(getStorageConf(new Configuration())).when(mockMetaClient).getStorageConf();
     when(mockMetaClient.getBasePath()).thenReturn(new StoragePath("/tmp/test-table"));
     when(mockActiveTimeline.getCleanerTimeline()).thenReturn(mockCleanerTimeline);
@@ -87,6 +93,10 @@ class TestHudiConversionSource {
         .thenReturn(mockCompletedCommitsTimeline);
     when(mockCommitInstant.requestedTime()).thenReturn("20200101120000000");
     when(mockCompletedCommitsTimeline.lastInstant()).thenReturn(Option.of(mockCommitInstant));
+    // table version 9 resolves the checkpoint by completion time
+    when(mockCommitInstant.getCompletionTime()).thenReturn("20200101120000001");
+    when(mockCompletedCommitsTimeline.getInstants())
+        .thenReturn(Collections.singletonList(mockCommitInstant));
 
     HudiConversionSource hudiConversionSource =
         new HudiConversionSource(mockMetaClient, mock(PathBasedPartitionSpecExtractor.class));
@@ -97,9 +107,12 @@ class TestHudiConversionSource {
         "isIncrementalSyncSafeFrom should return true when earliestCommitToRetain is null and no clean instants after last sync");
   }
 
-  @Test
-  void testIsIncrementalSyncSafeFromWithNullEarliestCommitToRetainWithCleanInstants()
-      throws Exception {
+  @ParameterizedTest
+  @EnumSource(
+      value = HoodieTableVersion.class,
+      names = {"SIX", "NINE"})
+  void testIsIncrementalSyncSafeFromWithNullEarliestCommitToRetainWithCleanInstants(
+      HoodieTableVersion tableVersion) throws Exception {
     HoodieTableMetaClient mockMetaClient = mock(HoodieTableMetaClient.class);
     HoodieActiveTimeline mockActiveTimeline = mock(HoodieActiveTimeline.class);
     HoodieTimeline mockCleanerTimeline = mock(HoodieTimeline.class);
@@ -113,6 +126,7 @@ class TestHudiConversionSource {
     when(mockMetaClient.getActiveTimeline()).thenReturn(mockActiveTimeline);
     when(mockMetaClient.getTableConfig()).thenReturn(mockTableConfig);
     when(mockTableConfig.isMetadataTableAvailable()).thenReturn(false);
+    when(mockTableConfig.getTableVersion()).thenReturn(tableVersion);
     doReturn(getStorageConf(new Configuration())).when(mockMetaClient).getStorageConf();
     when(mockMetaClient.getBasePath()).thenReturn(new StoragePath("/tmp/test-table"));
     when(mockActiveTimeline.getCleanerTimeline()).thenReturn(mockCleanerTimeline);
@@ -130,6 +144,10 @@ class TestHudiConversionSource {
         .thenReturn(mockCompletedCommitsTimeline);
     when(mockCommitInstant.requestedTime()).thenReturn("20200101120000000");
     when(mockCompletedCommitsTimeline.lastInstant()).thenReturn(Option.of(mockCommitInstant));
+    // table version 9 resolves the checkpoint by completion time
+    when(mockCommitInstant.getCompletionTime()).thenReturn("20200101120000001");
+    when(mockCompletedCommitsTimeline.getInstants())
+        .thenReturn(Collections.singletonList(mockCommitInstant));
 
     HudiConversionSource hudiConversionSource =
         new HudiConversionSource(mockMetaClient, mock(PathBasedPartitionSpecExtractor.class));
@@ -140,9 +158,12 @@ class TestHudiConversionSource {
         "isIncrementalSyncSafeFrom should return false when earliestCommitToRetain is null but clean instants exist after last sync");
   }
 
-  @Test
-  void testIsIncrementalSyncSafeFromWithEmptyEarliestCommitToRetainWithCleanInstants()
-      throws Exception {
+  @ParameterizedTest
+  @EnumSource(
+      value = HoodieTableVersion.class,
+      names = {"SIX", "NINE"})
+  void testIsIncrementalSyncSafeFromWithEmptyEarliestCommitToRetainWithCleanInstants(
+      HoodieTableVersion tableVersion) throws Exception {
     HoodieTableMetaClient mockMetaClient = mock(HoodieTableMetaClient.class);
     HoodieActiveTimeline mockActiveTimeline = mock(HoodieActiveTimeline.class);
     HoodieTimeline mockCleanerTimeline = mock(HoodieTimeline.class);
@@ -156,6 +177,7 @@ class TestHudiConversionSource {
     when(mockMetaClient.getActiveTimeline()).thenReturn(mockActiveTimeline);
     when(mockMetaClient.getTableConfig()).thenReturn(mockTableConfig);
     when(mockTableConfig.isMetadataTableAvailable()).thenReturn(false);
+    when(mockTableConfig.getTableVersion()).thenReturn(tableVersion);
     doReturn(getStorageConf(new Configuration())).when(mockMetaClient).getStorageConf();
     when(mockMetaClient.getBasePath()).thenReturn(new StoragePath("/tmp/test-table"));
     when(mockActiveTimeline.getCleanerTimeline()).thenReturn(mockCleanerTimeline);
@@ -172,6 +194,10 @@ class TestHudiConversionSource {
         .thenReturn(mockCompletedCommitsTimeline);
     when(mockCommitInstant.requestedTime()).thenReturn("20200101120000000");
     when(mockCompletedCommitsTimeline.lastInstant()).thenReturn(Option.of(mockCommitInstant));
+    // table version 9 resolves the checkpoint by completion time
+    when(mockCommitInstant.getCompletionTime()).thenReturn("20200101120000001");
+    when(mockCompletedCommitsTimeline.getInstants())
+        .thenReturn(Collections.singletonList(mockCommitInstant));
 
     HudiConversionSource hudiConversionSource =
         new HudiConversionSource(mockMetaClient, mock(PathBasedPartitionSpecExtractor.class));
diff --git a/xtable-core/src/test/java/org/apache/xtable/hudi/TestHudiConversionTarget.java b/xtable-core/src/test/java/org/apache/xtable/hudi/TestHudiConversionTarget.java
index bc9637e8..ed6be7a7 100644
--- a/xtable-core/src/test/java/org/apache/xtable/hudi/TestHudiConversionTarget.java
+++ b/xtable-core/src/test/java/org/apache/xtable/hudi/TestHudiConversionTarget.java
@@ -21,10 +21,13 @@ package org.apache.xtable.hudi;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertFalse;
 import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
+import java.io.IOException;
+import java.io.UncheckedIOException;
 import java.time.Instant;
 import java.util.Arrays;
 import java.util.Collections;
@@ -38,9 +41,13 @@ import org.junit.jupiter.api.Test;
 import org.junit.jupiter.params.ParameterizedTest;
 import org.junit.jupiter.params.provider.ValueSource;
 
+import org.apache.hudi.common.model.HoodieReplaceCommitMetadata;
 import org.apache.hudi.common.table.HoodieTableConfig;
 import org.apache.hudi.common.table.HoodieTableMetaClient;
 import org.apache.hudi.common.table.HoodieTableVersion;
+import org.apache.hudi.common.table.timeline.HoodieActiveTimeline;
+import org.apache.hudi.common.table.timeline.HoodieInstant;
+import org.apache.hudi.common.table.timeline.HoodieTimeline;
 import org.apache.hudi.common.util.Option;
 import org.apache.hudi.metadata.HoodieIndexVersion;
 
@@ -53,6 +60,7 @@ import org.apache.xtable.model.schema.InternalPartitionField;
 import org.apache.xtable.model.schema.InternalSchema;
 import org.apache.xtable.model.schema.InternalType;
 import org.apache.xtable.model.schema.PartitionTransformType;
+import org.apache.xtable.model.storage.InternalDataFile;
 import org.apache.xtable.model.storage.InternalFilesDiff;
 import org.apache.xtable.model.storage.PartitionFileGroup;
 
@@ -229,10 +237,100 @@ public class TestHudiConversionTarget {
     when(mockTableConfig.getTableVersion()).thenReturn(HoodieTableVersion.current());
     when(mockBaseFileUpdatesExtractor.convertDiff(input, instant, HoodieIndexVersion.V2))
         .thenReturn(output);
+    mockLastCommit(mockMetaClient, null);
 
     targetClient.syncFilesForDiff(input);
     // validate that replace metadata is set in commitState
     verify(mockCommitState).setReplaceMetadata(output);
+    // a table without completed commits uses the file-group prefix layout
+    verify(mockCommitState).setFileGroupPrefixLayout(true);
+  }
+
+  @Test
+  void syncFilesForDiffRejectsFileGroupPrefixOnOldLayout() {
+    HudiConversionTarget targetClient = getTargetClient(null);
+    HoodieTableMetaClient mockMetaClient = initMocksForBeginSync(targetClient).getRight();
+    // a commit written by XTable 0.4.0 has no file-group prefix layout marker
+    mockLastCommit(mockMetaClient, new HoodieReplaceCommitMetadata());
+    InternalFilesDiff input =
+        InternalFilesDiff.builder()
+            .fileAdded(
+                InternalDataFile.builder()
+                    .physicalPath(BASE_PATH + "/partition/bucket-0/file.parquet")
+                    .partitionSubdirectory(Optional.of("bucket-0"))
+                    .build())
+            .build();
+
+    NotSupportedException exception =
+        assertThrows(NotSupportedException.class, () -> targetClient.syncFilesForDiff(input));
+    assertTrue(exception.getMessage().contains("syncMode FULL"));
+  }
+
+  @Test
+  void syncFilesForDiffCarriesOldLayoutForward() {
+    HudiConversionTarget targetClient = getTargetClient(null);
+    Pair<HudiConversionTarget.CommitState, HoodieTableMetaClient> mocks =
+        initMocksForBeginSync(targetClient);
+    HudiConversionTarget.CommitState mockCommitState = mocks.getLeft();
+    HoodieTableMetaClient mockMetaClient = mocks.getRight();
+    when(mockCommitState.getInstantTime()).thenReturn("commit");
+    when(mockMetaClient.getIndexMetadata()).thenReturn(Option.empty());
+    when(mockMetaClient.getTableConfig().getTableVersion())
+        .thenReturn(HoodieTableVersion.current());
+    mockLastCommit(mockMetaClient, new HoodieReplaceCommitMetadata());
+
+    // a diff without file-group prefixes is safe on the old layout, but must not mark the new one
+    targetClient.syncFilesForDiff(InternalFilesDiff.builder().build());
+    verify(mockCommitState).setFileGroupPrefixLayout(false);
+  }
+
+  @Test
+  void syncFilesForDiffAcceptsFileGroupPrefixOnNewLayout() {
+    HudiConversionTarget targetClient = getTargetClient(null);
+    Pair<HudiConversionTarget.CommitState, HoodieTableMetaClient> mocks =
+        initMocksForBeginSync(targetClient);
+    HudiConversionTarget.CommitState mockCommitState = mocks.getLeft();
+    HoodieTableMetaClient mockMetaClient = mocks.getRight();
+    when(mockCommitState.getInstantTime()).thenReturn("commit");
+    when(mockMetaClient.getIndexMetadata()).thenReturn(Option.empty());
+    when(mockMetaClient.getTableConfig().getTableVersion())
+        .thenReturn(HoodieTableVersion.current());
+    HoodieReplaceCommitMetadata commitMetadata = new HoodieReplaceCommitMetadata();
+    commitMetadata.addMetadata(HudiConversionTarget.FILE_GROUP_PREFIX_LAYOUT, "true");
+    mockLastCommit(mockMetaClient, commitMetadata);
+    InternalFilesDiff input =
+        InternalFilesDiff.builder()
+            .fileAdded(
+                InternalDataFile.builder()
+                    .physicalPath(BASE_PATH + "/partition/bucket-0/file.parquet")
+                    .partitionSubdirectory(Optional.of("bucket-0"))
+                    .build())
+            .build();
+
+    targetClient.syncFilesForDiff(input);
+    verify(mockCommitState).setFileGroupPrefixLayout(true);
+  }
+
+  /** Stubs the last completed commit; a null commit metadata means the timeline is empty. */
+  private static void mockLastCommit(
+      HoodieTableMetaClient mockMetaClient, HoodieReplaceCommitMetadata commitMetadata) {
+    HoodieActiveTimeline mockActiveTimeline = mock(HoodieActiveTimeline.class);
+    HoodieTimeline mockCommitsTimeline = mock(HoodieTimeline.class);
+    when(mockMetaClient.getActiveTimeline()).thenReturn(mockActiveTimeline);
+    when(mockActiveTimeline.getCommitsTimeline()).thenReturn(mockCommitsTimeline);
+    when(mockCommitsTimeline.filterCompletedInstants()).thenReturn(mockCommitsTimeline);
+    if (commitMetadata == null) {
+      when(mockCommitsTimeline.lastInstant()).thenReturn(Option.empty());
+      return;
+    }
+    HoodieInstant mockInstant = mock(HoodieInstant.class);
+    when(mockInstant.getAction()).thenReturn(HoodieTimeline.REPLACE_COMMIT_ACTION);
+    when(mockCommitsTimeline.lastInstant()).thenReturn(Option.of(mockInstant));
+    try {
+      when(mockActiveTimeline.readReplaceCommitMetadata(mockInstant)).thenReturn(commitMetadata);
+    } catch (IOException ex) {
+      throw new UncheckedIOException(ex);
+    }
   }
 
   @Test
@@ -254,6 +352,7 @@ public class TestHudiConversionTarget {
     targetClient.syncFilesForSnapshot(input);
     // validate that replace metadata is set in commitState
     verify(mockCommitState).setReplaceMetadata(output);
+    verify(mockCommitState).setFileGroupPrefixLayout(true);
   }
 
   @Test
@@ -276,7 +375,8 @@ public class TestHudiConversionTarget {
     when(mockMetaClient.getTableConfig()).thenReturn(mockTableConfig);
     when(mockTableConfig.getRecordKeyFields())
         .thenReturn(Option.of(new String[] {"record_key_field"}));
-    when(mockHudiTableManager.initializeHudiTable(BASE_PATH, TABLE, null))
+    when(mockHudiTableManager.initializeHudiTable(
+            BASE_PATH, TABLE, null, HudiTargetConfig.DEFAULT_TABLE_VERSION))
         .thenReturn(mockMetaClient);
     HudiConversionTarget.CommitState mockCommitState = mock(HudiConversionTarget.CommitState.class);
     when(mockCommitStateCreator.create(
diff --git a/xtable-core/src/test/java/org/apache/xtable/hudi/TestHudiFileStatsExtractor.java b/xtable-core/src/test/java/org/apache/xtable/hudi/TestHudiFileStatsExtractor.java
index d7103579..45835e90 100644
--- a/xtable-core/src/test/java/org/apache/xtable/hudi/TestHudiFileStatsExtractor.java
+++ b/xtable-core/src/test/java/org/apache/xtable/hudi/TestHudiFileStatsExtractor.java
@@ -61,6 +61,8 @@ import org.apache.parquet.hadoop.util.HadoopOutputFile;
 import org.jetbrains.annotations.NotNull;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.io.TempDir;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.EnumSource;
 
 import org.apache.hudi.avro.model.HoodieMetadataColumnStats;
 import org.apache.hudi.client.common.HoodieJavaEngineContext;
@@ -142,14 +144,27 @@ public class TestHudiFileStatsExtractor {
                   decimalField))
           .build();
 
-  @Test
-  void columnStatsWithMetadataTable(@TempDir Path tempDir) throws Exception {
+  @ParameterizedTest
+  @EnumSource(
+      value = HoodieTableVersion.class,
+      names = {"SIX", "NINE"})
+  void columnStatsWithMetadataTable(HoodieTableVersion tableVersion, @TempDir Path tempDir)
+      throws Exception {
+    // Column-stats index V1 (table version 6) excludes DECIMAL/FIXED columns (HUDI-8585), so the
+    // decimal_field gets no stats and 8 columns are indexed. Index V2 (table version 9) supports
+    // these types, so the decimal_field is present and 9 columns are indexed. See #834.
+    boolean includeDecimal = tableVersion == HoodieTableVersion.NINE;
     String tableName = GenericTable.getTableName();
     String basePath;
     HoodieTableMetaClient metaClient;
     try (TestJavaHudiTable table =
         TestJavaHudiTable.withSchema(
-            tableName, tempDir, "long_field:SIMPLE", HoodieTableType.COPY_ON_WRITE, AVRO_SCHEMA)) {
+            tableName,
+            tempDir,
+            "long_field:SIMPLE",
+            HoodieTableType.COPY_ON_WRITE,
+            AVRO_SCHEMA,
+            tableVersion)) {
       List<HoodieRecord<HoodieAvroPayload>> records =
           getRecords().stream().map(this::buildRecord).collect(Collectors.toList());
       table.insertRecords(true, records);
@@ -182,7 +197,7 @@ public class TestHudiFileStatsExtractor {
         fileStatsExtractor
             .addStatsToFiles(tableMetadata, Stream.of(inputFile), schema)
             .collect(Collectors.toList());
-    validateOutput(output, false);
+    validateOutput(output, includeDecimal);
   }
 
   @Test
diff --git a/xtable-core/src/test/java/org/apache/xtable/hudi/TestHudiTableManager.java b/xtable-core/src/test/java/org/apache/xtable/hudi/TestHudiTableManager.java
index ece8f81c..fa3a2c9b 100644
--- a/xtable-core/src/test/java/org/apache/xtable/hudi/TestHudiTableManager.java
+++ b/xtable-core/src/test/java/org/apache/xtable/hudi/TestHudiTableManager.java
@@ -38,6 +38,7 @@ import org.junit.jupiter.params.provider.Arguments;
 import org.junit.jupiter.params.provider.MethodSource;
 
 import org.apache.hudi.common.table.HoodieTableMetaClient;
+import org.apache.hudi.common.table.HoodieTableVersion;
 import org.apache.hudi.storage.StorageConfiguration;
 
 import org.apache.xtable.model.InternalTable;
@@ -96,7 +97,7 @@ public class TestHudiTableManager {
             .layoutStrategy(dataLayoutStrategy)
             .build();
 
-    tableManager.initializeHudiTable(tableBasePath, table, null);
+    tableManager.initializeHudiTable(tableBasePath, table, null, HoodieTableVersion.NINE);
 
     HoodieTableMetaClient metaClient =
         HoodieTableMetaClient.builder()
@@ -140,7 +141,7 @@ public class TestHudiTableManager {
             .layoutStrategy(DataLayoutStrategy.FLAT)
             .build();
 
-    tableManager.initializeHudiTable(tableBasePath, table, "my_namespace");
+    tableManager.initializeHudiTable(tableBasePath, table, "my_namespace", HoodieTableVersion.NINE);
 
     HoodieTableMetaClient metaClient =
         HoodieTableMetaClient.builder()
diff --git a/xtable-core/src/test/java/org/apache/xtable/hudi/TestHudiTargetConfig.java b/xtable-core/src/test/java/org/apache/xtable/hudi/TestHudiTargetConfig.java
new file mode 100644
index 00000000..fd6465c5
--- /dev/null
+++ b/xtable-core/src/test/java/org/apache/xtable/hudi/TestHudiTargetConfig.java
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+package org.apache.xtable.hudi;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+import java.util.Properties;
+
+import org.junit.jupiter.api.Test;
+
+import org.apache.hudi.common.table.HoodieTableVersion;
+
+public class TestHudiTargetConfig {
+
+  @Test
+  void defaultsToTableVersionSix() {
+    assertEquals(
+        HoodieTableVersion.SIX,
+        HudiTargetConfig.fromProperties(new Properties()).getTableVersion());
+    assertEquals(HoodieTableVersion.SIX, HudiTargetConfig.fromProperties(null).getTableVersion());
+  }
+
+  @Test
+  void honoursConfiguredVersion() {
+    Properties sixProps = new Properties();
+    sixProps.setProperty(HudiTargetConfig.HUDI_TABLE_VERSION, "6");
+    assertEquals(
+        HoodieTableVersion.SIX, HudiTargetConfig.fromProperties(sixProps).getTableVersion());
+
+    Properties nineProps = new Properties();
+    nineProps.setProperty(HudiTargetConfig.HUDI_TABLE_VERSION, "9");
+    assertEquals(
+        HoodieTableVersion.NINE, HudiTargetConfig.fromProperties(nineProps).getTableVersion());
+  }
+
+  @Test
+  void rejectsUnsupportedVersion() {
+    Properties props = new Properties();
+    props.setProperty(HudiTargetConfig.HUDI_TABLE_VERSION, "8");
+    assertThrows(IllegalArgumentException.class, () -> HudiTargetConfig.fromProperties(props));
+  }
+
+  @Test
+  void rejectsNonNumericAndUnknownVersions() {
+    for (String value : new String[] {"abc", "42"}) {
+      Properties props = new Properties();
+      props.setProperty(HudiTargetConfig.HUDI_TABLE_VERSION, value);
+      IllegalArgumentException exception =
+          assertThrows(
+              IllegalArgumentException.class, () -> HudiTargetConfig.fromProperties(props));
+      assertTrue(exception.getMessage().contains(HudiTargetConfig.HUDI_TABLE_VERSION));
+    }
+  }
+}
diff --git a/xtable-core/src/test/java/org/apache/xtable/paimon/TestPaimonDataFileExtractor.java b/xtable-core/src/test/java/org/apache/xtable/paimon/TestPaimonDataFileExtractor.java
index cd528361..cb5f0b18 100644
--- a/xtable-core/src/test/java/org/apache/xtable/paimon/TestPaimonDataFileExtractor.java
+++ b/xtable-core/src/test/java/org/apache/xtable/paimon/TestPaimonDataFileExtractor.java
@@ -25,6 +25,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.nio.file.Path;
 import java.util.List;
+import java.util.Optional;
 import java.util.stream.Collectors;
 
 import org.apache.hadoop.conf.Configuration;
@@ -154,6 +155,10 @@ public class TestPaimonDataFileExtractor {
       String path = dataFile.getPhysicalPath();
       assertTrue(path.contains("bucket-"));
       assertTrue(path.endsWith(".orc") || path.endsWith(".parquet"));
+      // the bucket directory is the partition subdirectory
+      String parentPath = path.substring(0, path.lastIndexOf('/'));
+      String bucketDirectory = parentPath.substring(parentPath.lastIndexOf('/') + 1);
+      assertEquals(Optional.of(bucketDirectory), dataFile.getPartitionSubdirectory());
     }
   }
 
@@ -209,6 +214,7 @@ public class TestPaimonDataFileExtractor {
 
     for (InternalDataFile file : filesDiff.dataFilesAdded()) {
       assertNotNull(file.getPartitionValues());
+      assertTrue(file.getPartitionSubdirectory().orElse("").startsWith("bucket-"));
     }
   }
 
diff --git a/xtable-service/src/test/java/org/apache/xtable/service/ITConversionService.java b/xtable-service/src/test/java/org/apache/xtable/service/ITConversionService.java
index 90b16b84..9bdb140a 100644
--- a/xtable-service/src/test/java/org/apache/xtable/service/ITConversionService.java
+++ b/xtable-service/src/test/java/org/apache/xtable/service/ITConversionService.java
@@ -157,12 +157,6 @@ public class ITConversionService {
   public void testVariousOperations(String sourceTableFormat, boolean isPartitioned) {
     String tableName = getTableName();
     List<String> targetTableFormats = getOtherFormats(sourceTableFormat);
-    if (sourceTableFormat.equals(PAIMON)) {
-      // TODO: Hudi 1.x target is not supported for un-partitioned Paimon source.
-      // https://github.com/apache/incubator-xtable/issues/777
-      targetTableFormats =
-          targetTableFormats.stream().filter(fmt -> !fmt.equals(HUDI)).collect(Collectors.toList());
-    }
     String partitionConfig = isPartitioned ? "level:VALUE" : null;
 
     try (GenericTable table =