Core: Reland test for geometry and geography metrics keeping counts without bounds#17147
Open
huan233usc wants to merge 1 commit into
Open
Core: Reland test for geometry and geography metrics keeping counts without bounds#17147huan233usc wants to merge 1 commit into
huan233usc wants to merge 1 commit into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reland of #17131, which was reverted in #17141 because it conflicted with the
ParquetMetricsFieldStatsrefactor (#17116) that landed around the same time.This version is rewritten on top of #17116's simplified metrics-test API, which
passes
Metricsdirectly toassertCounts/assertBoundsinstead of theremoved
MetricsWithStatswrapper.TestMetricsis the canonical per-type metrics test — it pins thevalue/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
testMetricsForGeospatialTypesasserting that geometry and geography keepvalue/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.testMetricsForGeospatialTypesruns across all fourformat versions and passes;
TestOrcMetricsskips it via the format assumption.