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/07 16:59:46 UTC

[iceberg] branch 1.0.x updated: Core: Increase inferred column metrics limit to 100 (#5933)

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

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


The following commit(s) were added to refs/heads/1.0.x by this push:
     new e2bb9ad7e7 Core: Increase inferred column metrics limit to 100 (#5933)
e2bb9ad7e7 is described below

commit e2bb9ad7e792efca419fa7c4a1afde7c4c44fa01
Author: Eduard Tudenhöfner <et...@gmail.com>
AuthorDate: Fri Oct 7 18:59:41 2022 +0200

    Core: Increase inferred column metrics limit to 100 (#5933)
    
    Co-authored-by: Ryan Blue <bl...@apache.org>
---
 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 a8ca36379e..4d833b0bf8 100644
--- a/core/src/main/java/org/apache/iceberg/TableProperties.java
+++ b/core/src/main/java/org/apache/iceberg/TableProperties.java
@@ -259,7 +259,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 b559b976af..ab29fb74e2 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()));