StrictMetricsEvaluator can match every row for nested isNaN with incomplete value counts
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 55/100
Research direction
Start with StrictMetricsEvaluator and the synthetic metrics cases in TestStrictMetricsEvaluator; compare the nested isNaN decision with the row evaluator when child value counts do not cover the file's record count. Then review the related cases in TestDeleteFiles across format versions 1–3. Done means incomplete NaN counts cannot authorize deleting the whole file, while complete all-NaN metrics still can.
Written by the indexing model from the issue text.
Description
StrictMetricsEvaluator currently treats a nested isNaN predicate as matching every row when the NaN count equals the value count, even if those counts do not cover the whole file.
For example, consider an optional struct parent with a required double value, and two rows: {parent: {value: NaN}} and {parent: null}. Legacy ORC metrics can report record count 2, child value count 1, null count 0, and NaN count 1. The row evaluator rejects the second row, but the strict metrics evaluator returns true. Consequently a metadata delete can remove the entire file instead of rejecting a partial match.
Expected: strict evaluation returns false unless the nested NaN count proves coverage of every row. Files with complete all-NaN metrics should remain eligible for metadata deletion.
Reproduced with synthetic file metrics in TestStrictMetricsEvaluator and TestDeleteFiles (format versions 1–3, main and a named branch). All seven new regression cases fail on the unmodified evaluator and pass with the fix. The targeted API/core suites pass (163 tests, 16 skipped), as do Spotless checks. Related to #19064, but this addresses strict NaN evaluation rather than inclusive null pruning.
- Dominant language
- Java
- Stars
- 9.5k
- Forks
- 3.7k
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 170
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/iceberg
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Spark: Test INSERT targets with computed IDENTIFIER expressionsPossibly taken @shivadarshan-devadiga claimed this 15 days ago. Openimprovement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
[Core] TestAvroPartitionStatsHandler fails on Windows due to unclosed partition statistics scanPossibly taken @Ankitkj1999 claimed this 17 days ago. Open
Difficulty 1/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Core: TableMetadata.Builder allows adding encryption keys to v1/v2 tablesPossibly taken @yusufyildiz34 claimed this 37 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
apache/iceberg#18632 · 1 comment ·
Maintainers usually reply within 1 day
-
Kafka: Filter empty strings and whitespace in IcebergSinkConfig stringToListPossibly taken @mohamed-elbrik claimed this 42 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 1/5 1-3 hours Newbie friendliness 92/100
HexaHexes/neoforge-mod-template#124 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
OpenLiberty/open-liberty#36410 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
erkamyaman/rust-anything#1153 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Card-Forge/forge#13173 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day