Skip to content

Commit d9bb013

Browse files
authored
Adds ExtensionType for Parquet geospatial WKB arrays (#8943)
# Which issue does this PR close? This does not fully close, but is an initial component of: - #8717 # Rationale for this change To keep PR size digestible, this implements the bi-directional extension type metadata parsing for Parquet geospatial arrays. An actual array type that allows users to easily interact with the data can come as a follow-on PR. # What changes are included in this PR? - Implements the ExtensionType for Parquet geospatial logical types - Adds GeoArrow compatible Metadata type to hold geospatial metadata - Adds basic tests around geospatial metadata serialization/deserialization - Integrates geospatial logical type parsing into schema extensions # Are these changes tested? Yes. Targeted unit tests for the metadata and associated parsing have been implemented. Higher level tests that show a full round-trip to and from arrays can be included in the array implementation PR. # Are there any user-facing changes? Yes. All new public items have been documented, and no API breaking changes have been made. ## cc @alamb @paleolimbot @kylebarron
1 parent 63212d2 commit d9bb013

File tree

7 files changed

+689
-131
lines changed

7 files changed

+689
-131
lines changed

parquet-geospatial/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ rust-version = { workspace = true }
3131
[dependencies]
3232
arrow-schema = { workspace = true }
3333
geo-traits = { version = "0.3" }
34+
serde = { version = "1.0", default-features = false, features = ["derive"]}
35+
serde_json = { version = "1.0", default-features = false, features = ["std"]}
3436
wkb = { version = "0.9.1" }
3537

3638
[dev-dependencies]

parquet-geospatial/src/lib.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,10 @@
3030
pub mod bounding;
3131
pub mod interval;
3232
pub mod testing;
33+
34+
mod types;
35+
36+
pub use types::Edges as WkbEdges;
37+
pub use types::Hint as WkbTypeHint;
38+
pub use types::Metadata as WkbMetadata;
39+
pub use types::WkbType;

0 commit comments

Comments
 (0)