ORC: IS NULL on a struct field misses rows whose parent struct is null
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 20/100
Línea de trabajo
Start by tracing OrcMetrics and ExpressionToSearchArgument, the two locations identified in the issue, and compare their handling of nested struct nulls with Spark's fix in SPARK-60362. Check the ORC read and delete paths, including the Trino manifest pruning behavior. Done means the query and DELETE include rows whose parent struct is null, without incorrect pruning.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Apache Iceberg version
1.12.0 (also reproduces on 1.10.1 and 1.4.3)
Query engine
Spark
Please describe the bug 🐞
On ORC tables, IS NULL on a struct field misses rows where the parent struct is null, in reads and in DELETE:
CREATE TABLE t (id INT, st STRUCT<x: INT>) USING iceberg
TBLPROPERTIES ('write.format.default' = 'orc');
INSERT INTO t VALUES (1, NULL), (2, named_struct('x', 5));
SELECT id FROM t WHERE st.x IS NULL; -- no rows, expected 1
DELETE FROM t WHERE st.x IS NULL; -- row 1 is not deleted
The same table in Parquet returns and deletes row 1.
ORC only stores a struct field where all of its ancestors are present, and hasNull reflects the field's own nulls. Two places read that as "no nulls":
OrcMetricsrecordsnull_value_count = 0whenhasNull()is false, soIS NULLprunes the file.ExpressionToSearchArgumentpushesisNullon the nested column to ORC, which skips the row group based on the same statistics. Spark fixes this in its own ORC reader in SPARK-60362.
Trino reading the same table returns the same wrong result, since it prunes on the manifest counts.
Willingness to contribute
- I can contribute a fix for this bug independently
- Lenguaje dominante
- Java
- Estrellas
- 9.4k
- Forks
- 3.7k
- Merge medio
- 2 d 15 h
- PR fusionados (30 d)
- 169
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de apache/iceberg
-
Spark: Test INSERT targets with computed IDENTIFIER expressionsPosiblemente ocupada @shivadarshan-devadiga la tomó hace 8 días. Abiertoimprovement
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
[Core] TestAvroPartitionStatsHandler fails on Windows due to unclosed partition statistics scanPosiblemente ocupada @Ankitkj1999 la tomó hace 10 días. Abierto
Dificultad 1/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Flink: JdbcLockFactory concurrent lock-table creation can fail with "table already exists" and restart the jobPosiblemente ocupada @adiranjan25 la tomó hace 17 días. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
apache/iceberg#18797 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Core: TableMetadata.Builder allows adding encryption keys to v1/v2 tablesPosiblemente ocupada @yusufyildiz34 la tomó hace 29 días. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
apache/iceberg#18632 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Kafka: Filter empty strings and whitespace in IcebergSinkConfig stringToListPosiblemente ocupada @mohamed-elbrik la tomó hace 34 días. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
Todos los issues de apache/iceberg
Issues similares
-
needs-area-label
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Handle TSP error code 212Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
-
bug module: hybrid priority: high
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
bancolombia/bin-stash#92 ·
-
Pub/Sub nackSplit drops other splits' empty checkpoint entries and lowers pendingCheckpointsAbiertobug module:pubsub priority:P3
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
flink-gcp/flink-connector-gcp#2325 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
eclipse-dirigible/dirigible#8877 ·
Los mantenedores suelen responder en 1 día