Repository navigation
Support native (GeoArrow) encodings of GeoParquet 1.1 - #129121
Conversation
GeoParquet 1.1 allows geometry columns to be stored in the native (GeoArrow) encodings `point`, `linestring`, `polygon`, `multipoint`, `multilinestring` and `multipolygon`: nested lists of `struct<x: double, y: double>`. Previously such files could not be read at all, not even the schema, because the parser of the `geo` metadata threw `Incorrect encoding name in geo json metadata`. The layout of these encodings is the same as the layout of the corresponding geo types (e.g. `Polygon` is `Array(Array(Tuple(Float64, Float64)))`), so the column is read as a regular nested column with the geo type requested, in the native Parquet reader, the Arrow IPC reader, and the Arrow library based reader. A NULL geometry is read as the default value, the same as for WKB, and `Geometry` can be requested explicitly. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Workflow [PR], commit [1f92042] Summary: ✅
AI ReviewSummaryAdds support for all six GeoParquet 1.1 native geometry encodings in the Parquet and Arrow readers, including schema inference and explicit Missing context / blind spots
Final Verdict✅ Approve — no unresolved review findings. PR-head CI validation remains pending. |
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Compile time of recompiled translation units36 translation units recompiled, 296 s compile time in total, 36 of them have a recent master baseline. Median compile-time ratio to the baselines is ×0.94 (machine-speed difference or a change affecting every TU); per-TU deltas below are relative to that ratio. |
With `input_format_parquet_case_insensitive_column_matching` or `input_format_arrow_case_insensitive_column_matching`, a requested column `POINT` matches the file column `point`, but the `geo` metadata is keyed by the name in the file, so the native encoding was not found and `Geometry` reads failed. Keep the name according to the parquet schema in `parquet_name` and use the Arrow field name in the Arrow reader. Also exclude the new fixture from `00900_long_parquet_load_2`, as other GeoParquet fixtures tested separately. Address review: #129121 (comment) CI: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=129121&sha=50dfbd73c62dfd20b37a33f8ca99655dfaa8932f&name_0=PR&name_1=Stateless%20tests%20%28arm_binary%2C%20parallel%29 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Two semantic conflicts with master made the merge-queue run fail (MergeQueueCI run 43079186130, merge commit 9948f7e): - ClickHouse#129121 added a call to `reinterpretRawByteColumns` for native GeoArrow columns, while this branch gave that function a `repair_variants` parameter. Pass `true`, as the other materialized column call in `buildChunk` does; the geo target type has no `Variant`, so the value does not change the result. - ClickHouse#126530 extended the `-WithMemoryTracking` container style rule to `src/Processors/Formats`; use `VectorWithMemoryTracking` in `variantElementTargets`. Co-Authored-By: Claude Opus 5.5 <[email protected]>
GeoParquet 1.1 allows geometry columns to be stored in the native (GeoArrow) encodings
point,linestring,polygon,multipoint,multilinestringandmultipolygon, i.e. nested lists ofstruct<x: double, y: double>instead of WKB. GDAL, GeoPandas (geometry_encoding='geoarrow') and DuckDB can write such files. Before this change ClickHouse could not read them at all, not even the schema or the non-geometry columns:Incorrect encoding name in geo json metadata: point.The layout of these encodings is exactly the layout of the corresponding ClickHouse geo types (
Point=Tuple(Float64, Float64),LineString/MultiPoint=Array(Point),Polygon/MultiLineString=Array(Array(Point)),MultiPolygon=Array(Array(Array(Point)))), so the column is read as a regular nested column with the geo type requested, without any decoding:A NULL geometry is read as the default value (an empty array or
(0, 0)), the same as for WKB.Geometrycan be requested explicitly. Withinput_format_parquet_allow_geoparquet_parser = 0the columns are read as the underlying nested types. Geometries with Z/M coordinates (a struct with more than two fields) are still rejected with a type mismatch error.This is a step towards full GeoParquet support, so that ClickHouse can be listed at https://geoparquet.org/.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Support reading GeoParquet 1.1 files with geometry columns in the native (GeoArrow) encodings
point,linestring,polygon,multipoint,multilinestringandmultipolygon(in theParquetandArrowformats). Previously such files could not be read.🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/129121]
Version info
26.11.1.1429-master(included in26.11and later)