Replies: 1 comment 4 replies
-
|
Hi @VGSML, I haven't tested the Have you enabled Set the config with: SET arrow_lossless_conversion = true;Once you confirm it is not working, can you let me know? Rusty |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, all!
DuckDB already has a logical GEOMETRY type (used by the spatial extension), and inside DuckDB it supports BBOX filtering, MBR pushdowns and ST_* functions.
However, when a table is passed through Arrow Flight via the Airport extension, GEOMETRY is not supported at all — DuckDB receives it only as binary/blob, losing the logical type and all spatial optimizations.
Current limitation
• Airport passes Arrow schemas as-is.
• DuckDB -> Arrow and Arrow -> DuckDB do not include any mapping for GEOMETRY.
• As a result, Flight servers cannot expose spatial data to DuckDB in a way that preserves the logical geometry type.
Proposal (short-term, realistic)
Add an opt-in mapping in the Airport extension:
If an Arrow field is binary and has specific metadata (e.g. duckdb:geometry_binary), Airport should map it to the DuckDB logical type GEOMETRY when constructing the DuckDB schema.
This would allow:
• using real GEOMETRY columns in DuckDB when scanning via Airport,
• enabling BBOX pushdown,
• running ST_* functions without manual ST_GeomFromWKB(...),
• zero-copy scenarios for DuckDB↔DuckDB Flight connections.
Longer-term direction (within Airport)
Introduce optional support for GeoArrow extension types in Airport, and map them to DuckDB GEOMETRY automatically.
This would enable proper cross-system interoperability while keeping Airport the “geospatial-aware” Arrow layer for DuckDB.
Question
Would you consider adding:
1. An experimental opt-in mapping binary -> GEOMETRY based on metadata?
2. (Later) GeoArrow -> GEOMETRY conversion inside Airport?
Beta Was this translation helpful? Give feedback.
All reactions