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

the-other-tim-brown 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 c360922a [MINOR] Speed up Delta-heavy ITs and trim redundant checks 
(#1030)
c360922a is described below

commit c360922a8024c8a9f38b9d6f3e74e52f05ab58d9
Author: Tim Brown <[email protected]>
AuthorDate: Mon Nov 23 15:09:50 2026 -0500

    [MINOR] Speed up Delta-heavy ITs and trim redundant checks (#1030)
    
    * [MINOR] Speed up Delta-heavy ITs and trim redundant checks
    
    Tune the test Spark sessions the way Delta's own build does: Delta rebuilds
    snapshots with spark.databricks.delta.snapshotPartitions (default 50),
    which ignores spark.sql.shuffle.partitions. Also disable the Spark UI.
    
    Skip two full dataset comparisons in testVariousOperations for partitioned
    tables where the following step's check still catches the same errors.
    
    * [MINOR] Build modules two at a time in CI
    
    The modules after xtable-core only depend on it, so with -T 2 their tests
    overlap instead of running one after another (~13 min in sequence today).
    
    * [MINOR] Trim comments
---
 .github/workflows/mvn-ci-build.yml                                | 2 +-
 .../src/test/java/org/apache/xtable/ITConversionController.java   | 8 +++++---
 .../java/org/apache/xtable/delta/ITDeltaConversionSource.java     | 3 +++
 .../java/org/apache/xtable/delta/ITDeltaDeleteVectorConvert.java  | 3 +++
 .../src/test/java/org/apache/xtable/hudi/HudiTestUtil.java        | 5 +++++
 .../org/apache/xtable/kernel/ITDeltaKernelConversionSource.java   | 3 +++
 .../test/java/org/apache/xtable/hudi/sync/TestXTableSyncTool.java | 3 +++
 7 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/mvn-ci-build.yml 
b/.github/workflows/mvn-ci-build.yml
index e46b2155..5c39ce01 100644
--- a/.github/workflows/mvn-ci-build.yml
+++ b/.github/workflows/mvn-ci-build.yml
@@ -102,7 +102,7 @@ jobs:
             maven-build-cache-${{ runner.os }}-jdk${{ env.JDK_VERSION }}-
 
       - name: Build all module with Maven
-        run: ./mvnw clean install -ntp -B
+        run: ./mvnw clean install -ntp -B -T 2
 
       # Guard against a module starting to cache large artifacts again: warn 
and
       # skip the save rather than churn the repository-wide 10 GB cache budget,
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 6e92ffc6..1c4e2f79 100644
--- a/xtable-core/src/test/java/org/apache/xtable/ITConversionController.java
+++ b/xtable-core/src/test/java/org/apache/xtable/ITConversionController.java
@@ -471,7 +471,10 @@ public class ITConversionController {
 
       tableWithUpdatedSchema.deleteRows(insertsAfterSchemaUpdate.subList(60, 
90));
       conversionController.sync(conversionConfig, conversionSourceProvider);
-      checkDatasetEquivalence(sourceTableFormat, tableWithUpdatedSchema, 
targetTableFormats, 250);
+      // Partitioned: the next check still covers this sync.
+      if (!isPartitioned) {
+        checkDatasetEquivalence(sourceTableFormat, tableWithUpdatedSchema, 
targetTableFormats, 250);
+      }
 
       if (isPartitioned) {
         // Adds new partition.
@@ -479,10 +482,9 @@ public class ITConversionController {
         conversionController.sync(conversionConfig, conversionSourceProvider);
         checkDatasetEquivalence(sourceTableFormat, tableWithUpdatedSchema, 
targetTableFormats, 300);
 
-        // Drops partition.
+        // Not checked here: an error would still show up after the partition 
is re-populated.
         tableWithUpdatedSchema.deleteSpecialPartition();
         conversionController.sync(conversionConfig, conversionSourceProvider);
-        checkDatasetEquivalence(sourceTableFormat, tableWithUpdatedSchema, 
targetTableFormats, 250);
 
         // Insert records to the dropped partition again.
         tableWithUpdatedSchema.insertRecordsForSpecialPartition(50);
diff --git 
a/xtable-core/src/test/java/org/apache/xtable/delta/ITDeltaConversionSource.java
 
b/xtable-core/src/test/java/org/apache/xtable/delta/ITDeltaConversionSource.java
index 7d1df85c..5d4b6c8b 100644
--- 
a/xtable-core/src/test/java/org/apache/xtable/delta/ITDeltaConversionSource.java
+++ 
b/xtable-core/src/test/java/org/apache/xtable/delta/ITDeltaConversionSource.java
@@ -149,6 +149,9 @@ public class ITDeltaConversionSource {
             .config("spark.databricks.delta.schema.autoMerge.enabled", "true")
             .config("spark.sql.shuffle.partitions", "1")
             .config("spark.default.parallelism", "1")
+            .config("spark.databricks.delta.snapshotPartitions", "1")
+            
.config("spark.sql.sources.parallelPartitionDiscovery.parallelism", "1")
+            .config("spark.ui.enabled", "false")
             .config("spark.serializer", KryoSerializer.class.getName())
             .getOrCreate();
   }
diff --git 
a/xtable-core/src/test/java/org/apache/xtable/delta/ITDeltaDeleteVectorConvert.java
 
b/xtable-core/src/test/java/org/apache/xtable/delta/ITDeltaDeleteVectorConvert.java
index ed02893e..0c915e2d 100644
--- 
a/xtable-core/src/test/java/org/apache/xtable/delta/ITDeltaDeleteVectorConvert.java
+++ 
b/xtable-core/src/test/java/org/apache/xtable/delta/ITDeltaDeleteVectorConvert.java
@@ -71,6 +71,9 @@ public class ITDeltaDeleteVectorConvert {
             .config("spark.databricks.delta.schema.autoMerge.enabled", "true")
             .config("spark.sql.shuffle.partitions", "1")
             .config("spark.default.parallelism", "1")
+            .config("spark.databricks.delta.snapshotPartitions", "1")
+            
.config("spark.sql.sources.parallelPartitionDiscovery.parallelism", "1")
+            .config("spark.ui.enabled", "false")
             .config("spark.serializer", KryoSerializer.class.getName())
             .getOrCreate();
   }
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 02543b69..ee3dd922 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
@@ -142,6 +142,11 @@ public class HudiTestUtil {
         
.set("spark.databricks.delta.constraints.allowUnenforcedNotNull.enabled", 
"true")
         .set("spark.sql.shuffle.partitions", "1")
         .set("spark.default.parallelism", "1")
+        // Delta ignores the shuffle setting for snapshots and defaults to 50 
partitions.
+        .set("spark.databricks.delta.snapshotPartitions", "1")
+        .set("spark.sql.sources.parallelPartitionDiscovery.parallelism", "1")
+        .set("spark.ui.enabled", "false")
+        .set("spark.ui.showConsoleProgress", "false")
         .set("spark.sql.session.timeZone", "UTC")
         .set("spark.sql.extensions", "io.delta.sql.DeltaSparkSessionExtension")
         .set("spark.sql.catalog.spark_catalog", 
"org.apache.spark.sql.delta.catalog.DeltaCatalog")
diff --git 
a/xtable-core/src/test/java/org/apache/xtable/kernel/ITDeltaKernelConversionSource.java
 
b/xtable-core/src/test/java/org/apache/xtable/kernel/ITDeltaKernelConversionSource.java
index aba2aa4a..211c0c23 100644
--- 
a/xtable-core/src/test/java/org/apache/xtable/kernel/ITDeltaKernelConversionSource.java
+++ 
b/xtable-core/src/test/java/org/apache/xtable/kernel/ITDeltaKernelConversionSource.java
@@ -150,6 +150,9 @@ public class ITDeltaKernelConversionSource {
             .config("spark.databricks.delta.schema.autoMerge.enabled", "true")
             .config("spark.sql.shuffle.partitions", "1")
             .config("spark.default.parallelism", "1")
+            .config("spark.databricks.delta.snapshotPartitions", "1")
+            
.config("spark.sql.sources.parallelPartitionDiscovery.parallelism", "1")
+            .config("spark.ui.enabled", "false")
             .config("spark.serializer", KryoSerializer.class.getName())
             .getOrCreate();
   }
diff --git 
a/xtable-hudi-support/xtable-hudi-support-extensions/src/test/java/org/apache/xtable/hudi/sync/TestXTableSyncTool.java
 
b/xtable-hudi-support/xtable-hudi-support-extensions/src/test/java/org/apache/xtable/hudi/sync/TestXTableSyncTool.java
index 75c7db2c..1e9618d4 100644
--- 
a/xtable-hudi-support/xtable-hudi-support-extensions/src/test/java/org/apache/xtable/hudi/sync/TestXTableSyncTool.java
+++ 
b/xtable-hudi-support/xtable-hudi-support-extensions/src/test/java/org/apache/xtable/hudi/sync/TestXTableSyncTool.java
@@ -85,6 +85,9 @@ public class TestXTableSyncTool {
             
.set("spark.databricks.delta.constraints.allowUnenforcedNotNull.enabled", 
"true")
             .set("spark.sql.shuffle.partitions", "1")
             .set("spark.default.parallelism", "1")
+            .set("spark.databricks.delta.snapshotPartitions", "1")
+            .set("spark.sql.sources.parallelPartitionDiscovery.parallelism", 
"1")
+            .set("spark.ui.enabled", "false")
             .setMaster("local[4]");
     spark = SparkSession.builder().config(sparkConf).getOrCreate();
   }

Reply via email to