You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iceberg.apache.org by bl...@apache.org on 2022/10/23 21:19:21 UTC

[iceberg] branch master updated: Core: Increase inferred column metrics limit to 100 (#5916)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new bcd90987b3 Core: Increase inferred column metrics limit to 100 (#5916)
bcd90987b3 is described below

commit bcd90987b3bac6f7feec0ce0e6124197d6563acf
Author: Ryan Blue <bl...@apache.org>
AuthorDate: Sun Oct 23 14:19:17 2022 -0700

    Core: Increase inferred column metrics limit to 100 (#5916)
    
    Co-authored-by: Eduard Tudenhoefner <et...@gmail.com>
---
 core/src/main/java/org/apache/iceberg/TableProperties.java      | 2 +-
 data/src/test/java/org/apache/iceberg/io/TestWriterMetrics.java | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/core/src/main/java/org/apache/iceberg/TableProperties.java b/core/src/main/java/org/apache/iceberg/TableProperties.java
index d9310736bd..bfb484fddb 100644
--- a/core/src/main/java/org/apache/iceberg/TableProperties.java
+++ b/core/src/main/java/org/apache/iceberg/TableProperties.java
@@ -273,7 +273,7 @@ public class TableProperties {
 
   public static final String METRICS_MAX_INFERRED_COLUMN_DEFAULTS =
       "write.metadata.metrics.max-inferred-column-defaults";
-  public static final int METRICS_MAX_INFERRED_COLUMN_DEFAULTS_DEFAULT = 32;
+  public static final int METRICS_MAX_INFERRED_COLUMN_DEFAULTS_DEFAULT = 100;
 
   public static final String METRICS_MODE_COLUMN_CONF_PREFIX = "write.metadata.metrics.column.";
   public static final String DEFAULT_WRITE_METRICS_MODE = "write.metadata.metrics.default";
diff --git a/data/src/test/java/org/apache/iceberg/io/TestWriterMetrics.java b/data/src/test/java/org/apache/iceberg/io/TestWriterMetrics.java
index 219c37f208..21698cf376 100644
--- a/data/src/test/java/org/apache/iceberg/io/TestWriterMetrics.java
+++ b/data/src/test/java/org/apache/iceberg/io/TestWriterMetrics.java
@@ -208,7 +208,7 @@ public abstract class TestWriterMetrics<T> {
     File tableDir = temp.newFolder();
     tableDir.delete(); // created by table create
 
-    int numColumns = 33;
+    int numColumns = TableProperties.METRICS_MAX_INFERRED_COLUMN_DEFAULTS_DEFAULT + 1;
     List<Types.NestedField> fields = Lists.newArrayListWithCapacity(numColumns);
     for (int i = 0; i < numColumns; i++) {
       fields.add(required(i, "col" + i, Types.IntegerType.get()));
@@ -236,7 +236,7 @@ public abstract class TestWriterMetrics<T> {
 
     // start at 1 because IDs were reassigned in the table
     int id = 1;
-    for (; id <= 32; id += 1) {
+    for (; id <= TableProperties.METRICS_MAX_INFERRED_COLUMN_DEFAULTS_DEFAULT; id += 1) {
       Assert.assertNotNull("Should have lower bound metrics", dataFile.lowerBounds().get(id));
       Assert.assertNotNull("Should have upper bound metrics", dataFile.upperBounds().get(id));
       Assert.assertNull(
@@ -262,7 +262,7 @@ public abstract class TestWriterMetrics<T> {
     File tableDir = temp.newFolder();
     tableDir.delete(); // created by table create
 
-    int numColumns = 33;
+    int numColumns = TableProperties.METRICS_MAX_INFERRED_COLUMN_DEFAULTS_DEFAULT + 1;
     List<Types.NestedField> fields = Lists.newArrayListWithCapacity(numColumns);
     for (int i = 0; i < numColumns; i++) {
       fields.add(required(i, "col" + i, Types.IntegerType.get()));