Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

IN predicates > 200 values disable file pruning

オープン
#4,003 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
58/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python
領域
databases

調査の方向性

Start in _InclusiveMetricsEvaluationVisitor.visit_in and inspect the related use in table/update/validate.py; reproduce the 200-versus-201 benchmark described in the issue. Compare file-pruning behavior for large IN predicates and check whether the same evaluator affects conflict detection. Done means large predicates retain safe bounds-based pruning without changing the existing precise path below 200 values.

索引モデルが issue の本文から書いたものです。

説明

kind:bug
Apache Iceberg version

main (development)

Please describe the bug 🐞

While profiling the delete path from #3129, I noticed that plan_files() stops using file bounds as soon as an IN predicate contains more than 200 values.

In _InclusiveMetricsEvaluationVisitor.visit_in, we return ROWS_MIGHT_MATCH before checking the file bounds:

keys=200 planned_files=1 /20 rewritten=1
keys=201 planned_files=20 /20 rewritten=1
keys=1000 planned_files=20 /20 rewritten=1

This was on an unpartitioned table with 20 files of 10k rows each, disjoint key ranges, with all deleted keys belonging to the first file.

So the 201st value does not make the predicate significantly more expensive — it disables pruning and makes every file a candidate.

I also see the same effect when scaling the table: with the same layout, the 200 → 201 transition added about 0.15s on 5 files vs 3.60s on 80 files (median of 7 runs).

The limit comes from #1588 / #1672. The original concern was that evaluating large IN predicates could cost more than the pruning saves. However, the bounds check can potentially be reduced to a single min() / max() computation per predicate instead of scanning all literals for every file.

I would keep the current precise evaluation below the 200-value limit and only restore bounds-based pruning above it, where we currently don't prune at all.

One more thing: the same evaluator is used by conflict detection in table/update/validate.py, so this may also affect false-positive conflicts for large IN predicates.

Questions
Is disabling all pruning above 200 values intentional?
Would a min/max bounds check above the limit be acceptable?
Should the Python change be mirrored in Java?

I haven't implemented the fix yet; I'd rather confirm the intended behavior first.

Benchmark: local SQLite catalog, Python 3.10, pyarrow 25.0.1, pyiceberg 0d58407, median of 7 runs.

I used an AI assistant to help run the benchmarks and inspect the code path; the reproduction and measurements are mine.

Willingness to contribute
  • I can contribute a fix for this bug independently
  • I would be willing to contribute a fix for this bug with guidance from the Iceberg community
  • I cannot contribute a fix for this bug at this time
主要言語
Python
スター
1.1k
フォーク
589
平均マージ
1日 20時間
マージ済み PR(30日)
68

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

apache/iceberg-python のほかの issue

apache/iceberg-python の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。