jkasireddy opened a new pull request, #3810:
URL: https://github.com/apache/iceberg-python/pull/3810

   <!--
   Thanks for opening a pull request!
   -->
   
   Closes #2699
   
   # Rationale for this change
   
   PyIceberg currently downgrades nested primitive fields to `counts`, which 
prevents lower and upper bound statistics from being collected for nested 
fields.
   
   This change enables statistics collection for nested primitive fields and 
adds support for `write.metadata.metrics.max-inferred-column-defaults`, 
following the behavior of the Iceberg Java implementation.
   
   When no explicit default metrics mode is configured, inferred metrics are 
limited to the configured number of fields. Primitive fields at the current 
struct level are prioritized before descending into nested fields. Explicit 
per-column metrics configuration continues to take precedence over the inferred 
limit.
   
   ## Are these changes tested?
   
   Yes.
   
   Added regression tests covering:
   
   - statistics collection for nested primitive fields
   - `write.metadata.metrics.max-inferred-column-defaults`
   - prioritization of top-level primitive fields before nested fields
   - explicit per-column overrides beyond the inferred limit
   - explicit default metrics mode behavior
   - zero and negative inferred-column limits
   - lower and upper bounds for nested struct, list, and map primitive fields
   
   Local test results:
   
   ```text
   uv run python -m pytest tests/io/test_pyarrow_stats.py -q
   24 passed


-- 
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