Skip to content

Core: Reland test for geometry and geography metrics keeping counts without bounds#17147

Open
huan233usc wants to merge 1 commit into
apache:mainfrom
huan233usc:geo-metrics-test
Open

Core: Reland test for geometry and geography metrics keeping counts without bounds#17147
huan233usc wants to merge 1 commit into
apache:mainfrom
huan233usc:geo-metrics-test

Conversation

@huan233usc

Copy link
Copy Markdown
Contributor

Reland of #17131, which was reverted in #17141 because it conflicted with the
ParquetMetrics FieldStats refactor (#17116) that landed around the same time.
This version is rewritten on top of #17116's simplified metrics-test API, which
passes Metrics directly to assertCounts / assertBounds instead of the
removed MetricsWithStats wrapper.

TestMetrics is the canonical per-type metrics test — it pins the
value/null-count and lower/upper-bound behavior of every primitive type across
the Parquet and ORC formats — but it had no geometry/geography coverage. Geo
columns were given counts-only metrics in #16850 (Parquet skips the
lexicographic WKB min/max, which is not meaningful for spatial data). This adds
testMetricsForGeospatialTypes asserting that geometry and geography keep
value/null counts while intentionally producing no bounds. Real spatial bounds
(geo_lower / geo_upper) remain a separate follow-up.

Geo values are only written by the Parquet path today, so the test is skipped
for other formats (ORC).

Testing: TestParquetMetrics.testMetricsForGeospatialTypes runs across all four
format versions and passes; TestOrcMetrics skips it via the format assumption.

Reland of apache#17131 (reverted in apache#17141 for conflicting with the ParquetMetrics
FieldStats refactor apache#17116). Rewritten on top of apache#17116's simplified metrics
test API, which passes Metrics directly to assertCounts/assertBounds instead of
the removed MetricsWithStats wrapper.

TestMetrics pins per-type metrics behavior but had no geometry/geography
coverage. Add testMetricsForGeospatialTypes asserting that geo columns keep
value/null counts while intentionally producing no lower/upper bounds
(lexicographic WKB min/max is not meaningful; spatial bounds are a separate
follow-up). Geo values are only written by the Parquet path today, so the test
is skipped for other formats.
@github-actions github-actions Bot added the core label Jul 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant