Spark: equality delete on a nested struct field deletes every row
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 58/100
調査の方向性
Start at DeleteFilter.applyEqDeletes and trace how StructProjection reads the nested equality key from an InternalRowWrapper-wrapped Spark row; compare that path with GenericDeleteFilter, which the report says works. Reproduce with the nested-field equality delete and the Spark reader, then check that only rows with st.k equal to 5 or 10 are removed and 5760 remain. The issue does not name a test file.
索引モデルが issue の本文から書いたものです。
説明
Apache Iceberg version
1.12.0 (iceberg-spark-runtime-4.1_2.13, Spark 4.1.3)
Query engine
Spark
Please describe the bug
An equality delete keyed on a field nested inside a struct removes every row when read through Iceberg's Spark reader, while Iceberg core's generic reader applies it correctly.
Repro
CREATE TABLE t (id int, st struct<k int, s string>, payload bigint) USING iceberg TBLPROPERTIES ('format-version'='2', 'write.delete.mode'='merge-on-read')- Insert 6000 rows with
st = named_struct('k', id % 50, 's', concat('s', id % 7)); every struct and key is non-null. - With the Java API write one Parquet equality delete file: delete schema
table.schema().select("st.k"),equalityFieldIds = [field id of st.k], two records (built withGenericRecord.create(deleteSchema)and a populated childst) whosest.kis 5 and 10; commit withnewRowDelta().addDeletes(...). - Expected: 5760 rows remain (the rows with
st.knot in {5, 10}).IcebergGenerics.read(table).build()returns 5760 rows -- correct.spark.table("t")/SELECT id FROM treturns 0 rows -- wrong.
The delete file is well formed: equality ids [4] match the data's st.k field id 4, the delete schema is {2: st: optional struct<4: k: optional int>}, record count 2, and the generic reader agrees with the independently computed expected set.
Where to look
The Spark reader's delete-apply path (DeleteFilter.applyEqDeletes with StructProjection over an InternalRowWrapper-wrapped Spark row) for an equality key that is a field inside a struct: the projected nested key apparently compares equal for every row, so every row matches the delete predicate. Core's GenericDeleteFilter path is not affected.
Found while building a native Iceberg scan for Spark that applies the same delete correctly (5760 rows) by reading the nested key through its ancestor struct.
Willingness to contribute
- I can contribute a fix for this bug independently
- 主要言語
- Java
- スター
- 9.4k
- フォーク
- 3.7k
- 平均マージ
- 2日 15時間
- マージ済み PR(30日)
- 169
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/iceberg のほかの issue
-
Spark: Test INSERT targets with computed IDENTIFIER expressions対応中かも @shivadarshan-devadiga が 8 日前に担当しました。 オープンimprovement
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
[Core] TestAvroPartitionStatsHandler fails on Windows due to unclosed partition statistics scan対応中かも @Ankitkj1999 が 10 日前に担当しました。 オープン
難易度 1/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
Flink: JdbcLockFactory concurrent lock-table creation can fail with "table already exists" and restart the job対応中かも @adiranjan25 が 17 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
apache/iceberg#18797 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Core: TableMetadata.Builder allows adding encryption keys to v1/v2 tables対応中かも @yusufyildiz34 が 29 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
apache/iceberg#18632 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Kafka: Filter empty strings and whitespace in IcebergSinkConfig stringToList対応中かも @mohamed-elbrik が 34 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
hermes-queue
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
chrisalunlloyd2-sudo/mindpalace#430 ·
メンテナーはふだん 1 日以内に返信
-
enhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
unitycatalog/unitycatalog#2363 ·
メンテナーはふだん 1 日以内に返信
-
area: editor P3 type: feature
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
halisonworks/mod-codeling#290 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
area/dependencies area/dependencies/js backport/26.6 backport/26.8 kind/cve severity/medium source/scan-dependencies status/triage
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 2 日以内に返信