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 219c37f208d3..21698cf37646 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 void testMaxColumns() throws IOException { File tableDir = temp.newFolder(); tableDir.delete(); // created by table create - int numColumns = 33; + int numColumns = TableProperties.METRICS_MAX_INFERRED_COLUMN_DEFAULTS_DEFAULT + 1; List 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 void testMaxColumns() throws IOException { // 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 void testMaxColumnsWithDefaultOverride() throws IOException { File tableDir = temp.newFolder(); tableDir.delete(); // created by table create - int numColumns = 33; + int numColumns = TableProperties.METRICS_MAX_INFERRED_COLUMN_DEFAULTS_DEFAULT + 1; List fields = Lists.newArrayListWithCapacity(numColumns); for (int i = 0; i < numColumns; i++) { fields.add(required(i, "col" + i, Types.IntegerType.get()));