Flink: a FLOAT comparison with +-Float.MAX_VALUE pushed into a Parquet / ORC scan drops every matching row (`<>` returns every row)
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 54/100
Línea de trabajo
Start in FlinkFilters, where Flink filter literals are converted before being passed to Iceberg expressions; compare that path with the behavior described in #19102. Reproduce with the provided Flink queries against Parquet or ORC and confirm Avro returns the expected rows. Done means comparisons at ±Float.MAX_VALUE return the matching rows consistently across the file formats.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Apache Iceberg version
1.12.0 (latest release)
Query engine
Flink
Please describe the bug 🐞
A Flink filter comparing a FLOAT column with CAST(-3.4028235E38 AS FLOAT) (that is, -Float.MAX_VALUE), or with +Float.MAX_VALUE, is pushed into the Iceberg source and the Parquet / ORC scan drops rows that match. =, <, <=, > and >= return no rows, and <> returns every row. The same table written as Avro returns the correct result.
Reproducer (Flink 2.3.0, iceberg-flink-runtime-2.3 1.12.0, Java 17, hadoop catalog):
CREATE TABLE ice.db.t (id INT, f FLOAT) WITH ('write.format.default'='parquet');
-- one row: id = 1, f = -3.4028235E38 (-Float.MAX_VALUE), inserted from a STRING cast to FLOAT
SELECT * FROM ice.db.t WHERE f = CAST(-3.4028235E38 AS FLOAT); -- [] (expected 1 row)
SELECT * FROM ice.db.t WHERE f <= CAST(-3.4028235E38 AS FLOAT); -- [] (expected 1 row)
SELECT * FROM ice.db.t WHERE f < CAST(-3.4E38 AS FLOAT); -- 1 row (control)
SELECT * FROM ice.db.t WHERE f <> CAST(3.4028235E38 AS FLOAT); -- 1 row
| format | f = -FLT_MAX |
f <= -FLT_MAX |
f < -3.4E38 |
f <> FLT_MAX |
|---|---|---|---|---|
| parquet | 0 rows (wrong) | 0 rows (wrong) | 1 row | 1 row |
| orc | 0 rows (wrong) | 0 rows (wrong) | 1 row | 1 row |
| avro | 1 row | 1 row | 1 row | 1 row |
With other stored values (-Infinity, -1E30, +Infinity, +FLT_MAX) the pattern is the same: a +-Float.MAX_VALUE literal makes every comparison false and <> true on Parquet and ORC, which is what Iceberg returns for a literal converted to belowMin() / aboveMax(). write.metadata.metrics.default=none does not change the result. A DOUBLE column compared with +-Double.MAX_VALUE is fine.
The likely cause is the literal conversion in FlinkFilters (as in #19102). Flink folds CAST(-3.4028235E38 AS FLOAT) into a FLOAT literal whose value is kept unrounded (-3.4028235E38 as a decimal or double, a little beyond -Float.MAX_VALUE as a double). That value is passed to Expressions.*, and binding it to the FLOAT column (DoubleLiteral.to(FloatType)) gives BELOW_MIN. #19102 covers literals of a wider type than the column. Here both are FLOAT, so a fix that only compares logical types would not cover this case. Converting the literal with getValueAs(Float.class) (rounding it to the column type, as Flink does) or not pushing out-of-range values would.
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
- Lenguaje dominante
- Java
- Estrellas
- 9.5k
- Forks
- 3.7k
- Merge medio
- 2 d 2 h
- PR fusionados (30 d)
- 170
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
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Spark: Test INSERT targets with computed IDENTIFIER expressionsPosiblemente ocupada @shivadarshan-devadiga la tomó hace 15 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 17 días. Abierto
Dificultad 1/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Core: TableMetadata.Builder allows adding encryption keys to v1/v2 tablesPosiblemente ocupada @yusufyildiz34 la tomó hace 37 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 42 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
-
bug vault
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
bancolombia/secrets-manager#150 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 92/100
HexaHexes/neoforge-mod-template#124 ·
Los mantenedores suelen responder en 1 día
-
awaiting triage java new feature P2
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 2 días
-
source-survicate: pagination reads pagination and stops after one page; substreams drop survey_idAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
OpenLiberty/open-liberty#36410 ·
Los mantenedores suelen responder en 1 día