Spark: equality delete on a nested struct field deletes every row
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 58/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- Java
- Stelle
- 9.4k
- Fork
- 3.7k
- Merge medio
- 2g 15h
- PR unite (30g)
- 169
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di apache/iceberg
-
Spark: Test INSERT targets with computed IDENTIFIER expressionsForse già presa @shivadarshan-devadiga l’ha presa 7 giorni fa. Apertaimprovement
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
[Core] TestAvroPartitionStatsHandler fails on Windows due to unclosed partition statistics scanForse già presa @Ankitkj1999 l’ha presa 9 giorni fa. Aperta
Difficoltà 1/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Flink: JdbcLockFactory concurrent lock-table creation can fail with "table already exists" and restart the jobForse già presa @adiranjan25 l’ha presa 16 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
apache/iceberg#18797 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Core: TableMetadata.Builder allows adding encryption keys to v1/v2 tablesForse già presa @yusufyildiz34 l’ha presa 29 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
apache/iceberg#18632 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Kafka: Filter empty strings and whitespace in IcebergSinkConfig stringToListForse già presa @mohamed-elbrik l’ha presa 34 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di apache/iceberg
Issue simili
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
erkamyaman/rust-anything#371 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
open-telemetry/opentelemetry-java-instrumentation#21429 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement lane:backlog
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
Sanne/incus-spawn#2544 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
speakeasy-api/speakeasy#2159 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
apache/flink-agents#1440 ·
I maintainer di solito rispondono entro 2 giorni