Fix TRTREE index crash on temporal and span columns#139
Open
estebanzimanyi wants to merge 1 commit into
Open
Conversation
df817c3 to
93acfbb
Compare
Member
Author
Reviewer's quickstart — ~2 minutesWhat this PR does: Fix TRTREE index crash on temporal and span columns. Files to read: Risk: narrow scope; the diff is small and self-contained. Stacked on its base PR — once the stack ahead of it lands, this rebases trivially. Cross-link: Linux arm64 CI needs #161 for the |
estebanzimanyi
added a commit
to estebanzimanyi/MobilityDuck
that referenced
this pull request
May 22, 2026
Re-applies the binding content from PRs MobilityDB#130 (parity-final-batch) and MobilityDB#139 (trtree-index-assertion) that the MEOS-pin/symbol-rename refactor silently dropped (the later 3-way merges were no-ops because the content sat in a common ancestor): - temporal_hash(tgeompoint/tgeometry), geometry/geography(tgeompoint) with the TgeoToGeomExec measure-geometry executor, atElevation/minusElevation, transformPipeline(tgeompoint), tgeompointSeqSetGaps, bearing/eCovers surface - TRTREE index support for STBOX/TBOX/span/temporal columns + the mandatory rowid projection (fixes the CREATE INDEX internal crash) - wire TemporalParquetFunctions::Register so temporalFooter is exposed
b591405 to
4beb327
Compare
54e3c44 to
0af64ae
Compare
fa2de57 to
17588c0
Compare
0af64ae to
fff43eb
Compare
40bf218 to
45df2ad
Compare
fff43eb to
fbf9182
Compare
45df2ad to
2067f2a
Compare
4995a85 to
bcbfe19
Compare
74ea89f to
e12394e
Compare
02dfc34 to
9fd27c5
Compare
e12394e to
8d61366
Compare
9fd27c5 to
784ab55
Compare
3e8da05 to
e5d0464
Compare
CREATE INDEX USING TRTREE on a tgeompoint or any non-stbox column crashed with DuckDB's generic "assertion failure within DuckDB" message. Bind rejected anything but STBOX/TSTZSPAN through an InternalException (rendered as the fake assertion crash) and the create-physical Finalize path memcpy-reinterpreted the temporal's MEOS-WKB blob as an STBox. Bind now accepts stbox, tbox, the five span types and the eight temporal types, selecting the matching MEOS R-tree flavour. Construct dispatches per column type: span/box blobs are inserted as-is, temporal spatial values derive an SRID-stripped STBox via tspatial_to_stbox, and other temporals go through rtree_insert_temporal. The create-physical parallel path delegates to the same Construct so index keys and the scan-time query box are derived identically. Unsupported column types raise a clean BinderException instead of a fake internal crash. Adds test/sql/parity/050_index_types.test covering every supported column type end-to-end plus the unsupported-type regression. Stacked on the MEOS pin bump (fix/bump-meos-pin) whose post-bump rtree_search and MeosType API this builds against. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
784ab55 to
e2e32db
Compare
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.
CREATE INDEX USING TRTREE on a tgeompoint or any non-stbox column crashed with DuckDB's generic "assertion failure within DuckDB" message because bind rejected anything but STBOX/TSTZSPAN through an InternalException and the create-physical Finalize path memcpy-reinterpreted the temporal's MEOS-WKB blob as an STBox struct. Bind now accepts stbox, tbox, the five span types and the eight temporal types and selects the matching MEOS R-tree flavour; Construct dispatches per column type, deriving an SRID-stripped STBox via tspatial_to_stbox for spatial temporals and using rtree_insert_temporal otherwise, while span and box blobs are inserted as-is. The create-physical parallel path delegates to the same Construct so index keys and the scan-time query box are derived identically, and an unsupported column type raises a clean BinderException instead of a fake internal crash. Adds test/sql/parity/050_index_types.test covering every supported column type end-to-end plus the unsupported-type regression. Stacked on #134 (fix/bump-meos-pin) whose post-bump MeosType and MeosArray-based rtree_search API this builds against; rebase onto main once #134 merges.