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 408792bd [MINOR] Stop TestIcebergSync generating zero-record data 
files (#919)
408792bd is described below

commit 408792bdfa629f7f43e68b523aec79c3eb17653f
Author: Sylwester Lachiewicz <[email protected]>
AuthorDate: Mon Aug 31 23:32:02 2026 +0200

    [MINOR] Stop TestIcebergSync generating zero-record data files (#919)
    
    Iceberg's InclusiveMetricsEvaluator returns ROWS_CANNOT_MATCH for any
    file whose recordCount is 0, so such a file is pruned from every
    filtered scan. getDataFile drew recordCount from an unseeded Random
    over [0, 10000), so roughly one run in five thousand dropped a file
    that validateIcebergTable expected and failed with "expected: <2> but
    was: <1>".
    
    Do not fold this back into a plain nextInt: a data file with no records
    is not a fixture any of these tests mean to build.
---
 .../src/test/java/org/apache/xtable/iceberg/TestIcebergSync.java        | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/xtable-core/src/test/java/org/apache/xtable/iceberg/TestIcebergSync.java 
b/xtable-core/src/test/java/org/apache/xtable/iceberg/TestIcebergSync.java
index cc70d4c0..a053e700 100644
--- a/xtable-core/src/test/java/org/apache/xtable/iceberg/TestIcebergSync.java
+++ b/xtable-core/src/test/java/org/apache/xtable/iceberg/TestIcebergSync.java
@@ -799,7 +799,7 @@ public class TestIcebergSync {
         .fileFormat(FileFormat.APACHE_PARQUET)
         .fileSizeBytes(RANDOM.nextInt(10000))
         .physicalPath(physicalPath)
-        .recordCount(RANDOM.nextInt(10000))
+        .recordCount(RANDOM.nextInt(10000) + 1)
         .partitionValues(partitionValues)
         .columnStats(Collections.emptyList())
         .build();

Reply via email to