Skip to content

Commit e2bb9ad

Browse files
nastrardblue
andauthored
Core: Increase inferred column metrics limit to 100 (#5933)
Co-authored-by: Ryan Blue <[email protected]>
1 parent b177356 commit e2bb9ad

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

core/src/main/java/org/apache/iceberg/TableProperties.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ private TableProperties() {}
259259

260260
public static final String METRICS_MAX_INFERRED_COLUMN_DEFAULTS =
261261
"write.metadata.metrics.max-inferred-column-defaults";
262-
public static final int METRICS_MAX_INFERRED_COLUMN_DEFAULTS_DEFAULT = 32;
262+
public static final int METRICS_MAX_INFERRED_COLUMN_DEFAULTS_DEFAULT = 100;
263263

264264
public static final String METRICS_MODE_COLUMN_CONF_PREFIX = "write.metadata.metrics.column.";
265265
public static final String DEFAULT_WRITE_METRICS_MODE = "write.metadata.metrics.default";

data/src/test/java/org/apache/iceberg/io/TestWriterMetrics.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ public void testMaxColumns() throws IOException {
208208
File tableDir = temp.newFolder();
209209
tableDir.delete(); // created by table create
210210

211-
int numColumns = 33;
211+
int numColumns = TableProperties.METRICS_MAX_INFERRED_COLUMN_DEFAULTS_DEFAULT + 1;
212212
List<Types.NestedField> fields = Lists.newArrayListWithCapacity(numColumns);
213213
for (int i = 0; i < numColumns; i++) {
214214
fields.add(required(i, "col" + i, Types.IntegerType.get()));
@@ -236,7 +236,7 @@ public void testMaxColumns() throws IOException {
236236

237237
// start at 1 because IDs were reassigned in the table
238238
int id = 1;
239-
for (; id <= 32; id += 1) {
239+
for (; id <= TableProperties.METRICS_MAX_INFERRED_COLUMN_DEFAULTS_DEFAULT; id += 1) {
240240
Assert.assertNotNull("Should have lower bound metrics", dataFile.lowerBounds().get(id));
241241
Assert.assertNotNull("Should have upper bound metrics", dataFile.upperBounds().get(id));
242242
Assert.assertNull(
@@ -262,7 +262,7 @@ public void testMaxColumnsWithDefaultOverride() throws IOException {
262262
File tableDir = temp.newFolder();
263263
tableDir.delete(); // created by table create
264264

265-
int numColumns = 33;
265+
int numColumns = TableProperties.METRICS_MAX_INFERRED_COLUMN_DEFAULTS_DEFAULT + 1;
266266
List<Types.NestedField> fields = Lists.newArrayListWithCapacity(numColumns);
267267
for (int i = 0; i < numColumns; i++) {
268268
fields.add(required(i, "col" + i, Types.IntegerType.get()));

0 commit comments

Comments
 (0)