binarybrain-009 opened a new pull request, #18695:
URL: https://github.com/apache/iceberg/pull/18695

   `testMaxColumnsWithDefaultOverride` should show that an explicit 
`write.metadata.metrics.default` keeps metrics for columns past the 
max-inferred-column limit. But it read the lower bounds from `upperBounds()` 
and checked column 1 on every loop iteration, so it kept passing when the extra 
column lost its metrics. This checks that both bound maps cover every column 
and checks each column's lower and upper bound through the loop variable, 
following `testMaxColumns`. The size assertions are there so that a missing 
column fails with a clear message instead of an unboxing NPE. This refreshes 
the stale #17269 by @thswlsqls.
   
   Closes #17268
   
   Test plan: With the explicit-default branch in `MetricsConfig.from()` 
disabled, the old test passed and the updated one fails (`Expected size: 101 
but was: 100`, ORC and Parquet) in `TestFlinkWriterMetrics` (Flink 2.3) and 
`TestSparkWriterMetrics` (Spark 4.2). Both pass on unmodified production code.
   
   ---
   **AI Disclosure**
   - Model: Claude Opus 5.5
   - Platform/Tool: Claude Code
   - Human Oversight: fully reviewed
   - Prompt Summary: Fix #17268 so testMaxColumnsWithDefaultOverride verifies 
lower and upper bounds for every column; the test change is generated.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to