datalake_fdw: NUMERIC/DECIMAL in the Parquet format layer
@MisterRaindrop ya está trabajando en esto.
Desde el 13/9/2026.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
Summary
contrib/datalake_fdw's Parquet format layer (#1951) refuses numeric columns at CREATE TABLE ... USING iceberg. DECIMAL is the most common column type in real lake tables, so this is the first type to add.
What has to be decided
- Storage form. Parquet stores DECIMAL four ways (INT32, INT64, FIXED_LEN_BYTE_ARRAY, BYTE_ARRAY). Iceberg's spec fixes the writer to
decimal(P,S)with P <= 38 backed by fixed-length bytes; the reader has to accept all four. - Unconstrained
numeric.atttypmod = -1has no precision or scale. Computing((typmod - 4) >> 16) & 65535without checking gives precision 65535 / scale 65531, so barenumericcolumns silently match nothing (the trap in lithium-tech/teavalidate.cpp:59-61). Iceberg needs P and S, so the likely answer is to refuse barenumericatCREATE TABLEand requirenumeric(P,S). - Precision above 38. PostgreSQL allows up to 1000;
decimal128caps at 38. Refuse atCREATE TABLE. - Conversion.
NumericVar<-> two's-complement int128, the way tea'sbridge.cpp:269-277andnumeric_var.cppdo it, withNaN/Infinityrefused on write.
Where
format/format_types.h/arrow_support.cpp:dl_format_type_refusal()decides whatCREATE TABLEaccepts; the mapping toarrow::decimal128(P, S)goes next to the other types.arrow_builder.cpp/arrow_decode.c: append and decode. The decoder reads the Arrow C data interface directly; the format string isd:P,S.- Tests in
test/automation/sqlrepo/smoke/format_parquet/, plusCREATE TABLErefusals iniceberg_am_reject.sql.
Deferred from #1951 on purpose: the framework there is settled, the type work is separate.
- Lenguaje dominante
- C
- Estrellas
- 1.4k
- Forks
- 248
- Merge medio
- 4 d 10 h
- PR fusionados (30 d)
- 40
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/cloudberry
-
type: Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
apache/cloudberry#1885 · 2 reacciones ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
apache/cloudberry#1825 ·
-
type: Bug
Dificultad 3/5 1-2 días Aptitud para principiantes 65/100
apache/cloudberry#2048 · 1 reacción ·
-
type: Bug
Dificultad 4/5 3-5 días Aptitud para principiantes 40/100
apache/cloudberry#2047 ·
-
type: Bug
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
apache/cloudberry#2046 · 1 comentario ·
Todos los issues de apache/cloudberry
Issues similares
-
Dificultad 2/5 1-2 días Aptitud para principiantes 78/100
brunodev85/gladio#18 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
OpenPrinting/cups#1721 ·
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
zephyrproject-rtos/zephyr#120318 · 1 comentario ·
-
issue: bug report
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
-
[BUG] [25.12.5] Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100