apache / apache/arrow-rs

[parquet-geospatial] Add geo_stats_accumulator_factory to WriterProperties

Open
#10,312 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Rust
Stars
3.6k
Forks
1.3k
Avg merge
2d 18h
Merged PRs (30d)
169

Description

### Is your feature request related to a problem or challenge?

Currently, applications can inject a custom GeoStatsAccumulator by calling `init_geo_stats_accumulator_factory()`. Such global state, which can only be initalized once per process, is not ideal from a design perspective. In particular, it makes it difficult to write libraries that produce a geospatial Parquet file under the hood; multiple libraries may want to register their own accumulator, but they can’t because the state is global. Admittedly this is a somewhat theoretical problem.

### Describe the solution you'd like

Proposal:
* Add `geo_stats_accumulator_factory` to WriterProperties (and its builder), gated on the `geospatial` feature flag.
* Mark the current `init_geo_stats_accumulator_factory()` as deprecated, and remove it at some later point.

Contributor guide

Open the contributing guide

Research direction

Start by locating WriterProperties and its builder, then trace init_geo_stats_accumulator_factory() and the geospatial feature flag. Add the per-WriterProperties factory path and deprecation handling for the global initializer, with tests covering the builder configuration and geospatial-gated behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
data-engineering
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.