Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Enable stats collection for nested fields and use write.metadata.metrics.max-inferred-column-defaults to control stats growth

Open
#2,699 4 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
66/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
python

Research direction

Start in pyiceberg/io/pyarrow.py around the linked lines that disable statistics for nested fields, then trace how write.metadata.metrics.max-inferred-column-defaults is handled. Done means nested struct fields can collect lower and upper bounds while the table property controls inferred-column statistics growth; use the existing statistics-related tests, if found nearby, to verify both behaviors.

Written by the indexing model from the issue text.

Description

Feature Request / Improvement

I recently discovered that full stats collection (i.e. lower_bounds/upper_bounds) is explicitly disabled in PyIceberg for nested (i.e. struct child) fields.

This change was made in this PR and specifically this commit.

It seems that this change may have been made to limit the number of fields whose stats are collected when default-full stats collection is enabled. However, after discussion it seems that simply adding support for the write.metadata.metrics.max-inferred-column-defaults table property would be the preferred way to control stats growth. If this is implemented, re-enabling stats collection for nested fields should be a non-issue.

Stats collection for nested struct fields is important for schemas like GeoParquet which store important primitive fields (in this case, bounding box xmin, ymin, xmax, ymax) using structs.

See also this slack thread for discussion.

Dominant language
Python
Stars
1.1k
Forks
589
Avg merge
2d 2h
Merged PRs (30d)
70

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/iceberg-python

All issues in apache/iceberg-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.