Skip to content

feat(vortex-geo): prune ST_Intersects filters via the AABB zone statistics#8775

Merged
HarukiMoriarty merged 2 commits into
developfrom
nemo/geo-intersects-prune
Jul 15, 2026
Merged

feat(vortex-geo): prune ST_Intersects filters via the AABB zone statistics#8775
HarukiMoriarty merged 2 commits into
developfrom
nemo/geo-intersects-prune

Conversation

@HarukiMoriarty

@HarukiMoriarty HarukiMoriarty commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Rationale for this change

Follow-up to #8646, which added the GeometryAabb zone-map statistic and used it to prune ST_Distance(geom, const) <op> r filters. This PR adds the second spatial predicate on the same statistic: ST_Intersects(geom, const). A chunk whose AABB is strictly separated from the constant's bounding box cannot contain an intersecting row, so the zone is skipped without any IO.

This PR also folds in two review follow-ups from #8646 that were pushed minutes after it merged:
tests pinning the radius-literal tolerance set, and the aabb_stat constructor requested in
review.

What changes are included in this PR?

…stic

- Add GeoIntersectsPrune: skips chunks whose AABB is strictly separated from
  the filter constant's bounding box (touching boxes scan, since touching
  geometries intersect); NOT-intersects and unprovable shapes fall through
  to the scan
- Restructure prune.rs into a directory module ready for future spatial
  predicates: mod.rs holds the shared proof vocabulary (geometry_and_constant,
  query_aabb, aabb_stat, min_dist_sq/max_dist_sq), each predicate is a leaf
  module owning its own test cases (distance.rs, intersects.rs), and shared
  zone-map fixtures live in test_harness.rs
- Fold in the #8646 review follow-ups that missed its merge: the aabb_stat
  ctor (part of the restructure) and tests pinning the radius-literal
  tolerance set - an integer radius casts and prunes, null and
  extension-typed radii decline to a scan; the harness takes any literal
  scalar

Signed-off-by: Nemo Yu <zyu379@wisc.edu>
@HarukiMoriarty HarukiMoriarty added the changelog/feature A new feature label Jul 15, 2026

@joseph-isaacs joseph-isaacs left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG

@HarukiMoriarty HarukiMoriarty enabled auto-merge (squash) July 15, 2026 20:08
@HarukiMoriarty HarukiMoriarty merged commit cdaa5a5 into develop Jul 15, 2026
70 checks passed
@HarukiMoriarty HarukiMoriarty deleted the nemo/geo-intersects-prune branch July 15, 2026 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/feature A new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants