Skip to content

feat: extend geometry typing and spatial support - #24136

Merged
mergify[bot] merged 87 commits into
matrixorigin:mainfrom
robll-v1:issue/23913
Apr 15, 2026
Merged

mergify[bot] merged 87 commits into
matrixorigin:mainfrom
robll-v1:issue/23913

Conversation

@robll-v1

Copy link
Copy Markdown
Contributor

What type of PR is this?

  • API-change
  • BUG
  • Improvement
  • Documentation
  • Feature
  • Test and CI
  • Code Refactoring

Which issue(s) this PR fixes:

issue #23913

What this PR does / why we need it:

This PR completes the current #23913 geometry delivery across parser/catalog metadata, runtime typing, frontend display, SQL-visible geometry behavior, SRID enforcement, and spatial index support.

  • add typed geometry DDL / metadata / protocol support for POINT, GEOMETRY, LINESTRING, POLYGON, MULTIPOINT, MULTILINESTRING, MULTIPOLYGON, and GEOMETRYCOLLECTION
  • extend SQL-visible geometry round-trip, measurement, relation, and validation behavior, including subtype checks, malformed payload rejection, finite-coordinate enforcement, SRID syntax / metadata / mismatch enforcement, and mixed-SRID runtime checks
  • wire SPATIAL INDEX creation / maintenance / planner paths so SHOW CREATE TABLE, SHOW INDEX, and indexed EXPLAIN paths work for validated predicates such as ST_DISTANCE and ST_Contains
  • sync SHOW / information_schema golden files to the delivered geometry metadata behavior

Validation:

  • make build
  • make ut
  • direct MySQL replay of the issue #23913 SQL matrix on 127.0.0.1:6001, including typed DDL, requested ST_*, SRID success/mismatch, SHOW CREATE TABLE, SHOW INDEX, and indexed EXPLAIN for ST_DISTANCE(... ) <= const and ST_Contains(indexed_geom, const_geom)
  • cd /Users/moukeyu/mo-tester && ./run.sh -n -g -p /Users/moukeyu/matrixone/test/distributed/cases/dml/show/show.test
    • [SUMMARY] COST : 4s, TOTAL :189, SUCCESS : 189, FAILED :0, IGNORED :0, ABNORAML :0, SUCCESS RATE : 100%
  • cd /Users/moukeyu/mo-tester && ./run.sh -n -g -p /Users/moukeyu/matrixone/test/distributed/cases/zz_accesscontrol/account_restricted.sql
    • [SUMMARY] COST : 5s, TOTAL :126, SUCCESS : 125, FAILED :0, IGNORED :1, ABNORAML :0, SUCCESS RATE : 100%
  • local full-BVT follow-up still exposes unrelated local blockers outside this geometry change set (default-db harness drift, non-geometry DDL lock semantics, and an existing ISCP recovery panic around unfinished vector index jobs)

robll-v1 and others added 30 commits April 2, 2026 18:06
Add parser, planner, runtime, and builtin support for geometry subtypes, core ST_* helpers, SRID enforcement, and the ST_Length line slice. Include unit tests plus focused SQL validation and mo-tester coverage.

Co-authored-by: Copilot <[email protected]>
Add incremental geometry helper support across the current advanced-function batch, including area/contains/within extensions plus point, ring, envelope, and centroid helpers with focused SQL coverage.

Co-authored-by: Copilot <[email protected]>
Add a narrow ST_Boundary slice for LINESTRING and POLYGON, including focused unit tests and SQL coverage.

Co-authored-by: Copilot <[email protected]>
Add a narrow ST_IsValid slice for POINT, LINESTRING, and POLYGON validity checks, including focused unit tests and SQL coverage.

Co-authored-by: Copilot <[email protected]>
Add a narrow ST_PointOnSurface slice for POINT, LINESTRING, and POLYGON, including focused unit tests and SQL coverage.

Co-authored-by: Copilot <[email protected]>
Add a narrow ST_Intersects slice for the current POINT, LINESTRING, and POLYGON support matrix, including focused unit tests and SQL coverage.

Co-authored-by: Copilot <[email protected]>
Add a narrow ST_Disjoint slice for the current POINT, LINESTRING, and POLYGON support matrix, including focused unit tests and SQL coverage.

Co-authored-by: Copilot <[email protected]>
Add a narrow ST_Touches slice for POINT with LINESTRING or POLYGON, including focused unit tests and SQL coverage.

Co-authored-by: Copilot <[email protected]>
Broaden the current ST_Touches slice to cover LINESTRING and POLYGON boundary-touch cases while keeping the supported matrix narrow and validated.

Co-authored-by: Copilot <[email protected]>
Broaden the current ST_Touches slice to cover LINESTRING peer cases while keeping the supported topology matrix narrow and fully validated.

Co-authored-by: Copilot <[email protected]>
Broaden the current ST_Touches slice to cover simple single-ring POLYGON peer cases while keeping area-overlap cases rejected and hole polygons unsupported.

Co-authored-by: Copilot <[email protected]>
Introduce the first ST_Crosses slice for POINT/LINESTRING, LINESTRING/LINESTRING, and LINESTRING/POLYGON cases, with focused validation and SQL coverage.

Co-authored-by: Copilot <[email protected]>
Introduce the first ST_Overlaps slice for LINESTRING partial-overlap cases, keeping the initial matrix narrow and fully validated before polygon extensions.

Co-authored-by: Copilot <[email protected]>
Broaden the current ST_Overlaps slice to cover simple single-ring POLYGON peer cases while keeping broader geometry families out of scope for now.

Co-authored-by: Copilot <[email protected]>
@mergify

mergify Bot commented Apr 15, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • ✅ Entered queue — 2026-04-15 07:13 UTC · Rule: main
  • ✅ Checks passed · in-place
  • ✅ Merged — 2026-04-15 08:12 UTC · at 1cedd283f7a2bc34c7f7e4113ada5a80b2f2f800

This pull request spent 59 minutes 17 seconds in the queue, including 58 minutes 59 seconds running CI.

Required conditions to merge
  • #approved-reviews-by >= 1 [🛡 GitHub branch protection]
  • #changes-requested-reviews-by = 0 [🛡 GitHub branch protection]
  • #review-threads-unresolved = 0 [🛡 GitHub branch protection]
  • branch-protection-review-decision = APPROVED [🛡 GitHub branch protection]
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Compose CI / multi cn e2e bvt test docker compose(PESSIMISTIC)
    • check-neutral = Matrixone Compose CI / multi cn e2e bvt test docker compose(PESSIMISTIC)
    • check-skipped = Matrixone Compose CI / multi cn e2e bvt test docker compose(PESSIMISTIC)
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Standlone CI / Multi-CN e2e BVT Test on Linux/x64(LAUNCH, PROXY)
    • check-neutral = Matrixone Standlone CI / Multi-CN e2e BVT Test on Linux/x64(LAUNCH, PROXY)
    • check-skipped = Matrixone Standlone CI / Multi-CN e2e BVT Test on Linux/x64(LAUNCH, PROXY)
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Standlone CI / e2e BVT Test on Linux/x64(LAUNCH, PESSIMISTIC)
    • check-neutral = Matrixone Standlone CI / e2e BVT Test on Linux/x64(LAUNCH, PESSIMISTIC)
    • check-skipped = Matrixone Standlone CI / e2e BVT Test on Linux/x64(LAUNCH, PESSIMISTIC)
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone CI / SCA Test on Ubuntu/x86
    • check-neutral = Matrixone CI / SCA Test on Ubuntu/x86
    • check-skipped = Matrixone CI / SCA Test on Ubuntu/x86
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone CI / UT Test on Ubuntu/x86
    • check-neutral = Matrixone CI / UT Test on Ubuntu/x86
    • check-skipped = Matrixone CI / UT Test on Ubuntu/x86
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Compose CI / multi cn e2e bvt test docker compose(Optimistic/PUSH)
    • check-neutral = Matrixone Compose CI / multi cn e2e bvt test docker compose(Optimistic/PUSH)
    • check-skipped = Matrixone Compose CI / multi cn e2e bvt test docker compose(Optimistic/PUSH)
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Standlone CI / e2e BVT Test on Linux/x64(LAUNCH,Optimistic)
    • check-neutral = Matrixone Standlone CI / e2e BVT Test on Linux/x64(LAUNCH,Optimistic)
    • check-skipped = Matrixone Standlone CI / e2e BVT Test on Linux/x64(LAUNCH,Optimistic)
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Upgrade CI / Compatibility Test With Target on Linux/x64(LAUNCH)
    • check-neutral = Matrixone Upgrade CI / Compatibility Test With Target on Linux/x64(LAUNCH)
    • check-skipped = Matrixone Upgrade CI / Compatibility Test With Target on Linux/x64(LAUNCH)
  • any of [🛡 GitHub branch protection]:
    • check-skipped = Matrixone Utils CI / Coverage
    • check-neutral = Matrixone Utils CI / Coverage
    • check-success = Matrixone Utils CI / Coverage

This branch was previously deployed

1 inactive deployment
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.

9 participants