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

lzljs3620320 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/paimon.git


The following commit(s) were added to refs/heads/master by this push:
     new 6b8d72bdf [core] Add limit to bundle interface (#4115)
6b8d72bdf is described below

commit 6b8d72bdff61494b780e8601e8d9a05ea223387d
Author: YeJunHao <[email protected]>
AuthorDate: Tue Sep 3 15:42:50 2024 +0800

    [core] Add limit to bundle interface (#4115)
---
 .../org/apache/paimon/io/StatsCollectingSingleFileWriter.java    | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git 
a/paimon-core/src/main/java/org/apache/paimon/io/StatsCollectingSingleFileWriter.java
 
b/paimon-core/src/main/java/org/apache/paimon/io/StatsCollectingSingleFileWriter.java
index 705204dfd..2f4190a04 100644
--- 
a/paimon-core/src/main/java/org/apache/paimon/io/StatsCollectingSingleFileWriter.java
+++ 
b/paimon-core/src/main/java/org/apache/paimon/io/StatsCollectingSingleFileWriter.java
@@ -73,6 +73,15 @@ public abstract class StatsCollectingSingleFileWriter<T, R> 
extends SingleFileWr
         }
     }
 
+    @Override
+    public void writeBundle(BundleRecords bundle) throws IOException {
+        Preconditions.checkState(
+                simpleStatsExtractor != null,
+                "Can't write bundle without simpleStatsExtractor, we may lose 
all the statistical information");
+
+        super.writeBundle(bundle);
+    }
+
     public SimpleColStats[] fieldStats() throws IOException {
         Preconditions.checkState(closed, "Cannot access metric unless the 
writer is closed.");
         if (simpleStatsExtractor != null) {

Reply via email to