Fix TRTREE index crash on temporal and span columns - #139
Merged
Conversation
estebanzimanyi
force-pushed
the
fix/trtree-index-assertion
branch
from
May 16, 2026 08:12
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
estebanzimanyi
force-pushed
the
fix/bump-meos-pin
branch
from
May 28, 2026 19:32
b591405 to
4beb327
Compare
estebanzimanyi
force-pushed
the
fix/trtree-index-assertion
branch
from
May 29, 2026 21:37
54e3c44 to
0af64ae
Compare
estebanzimanyi
changed the base branch from
fix/bump-meos-pin
to
fix/bump-meos-pin-wasm-pgconfig
May 30, 2026 06:29
estebanzimanyi
changed the base branch from
fix/bump-meos-pin-wasm-pgconfig
to
fix/bump-meos-pin
May 30, 2026 07:00
estebanzimanyi
force-pushed
the
fix/bump-meos-pin
branch
4 times, most recently
from
June 2, 2026 09:47
fa2de57 to
17588c0
Compare
estebanzimanyi
force-pushed
the
fix/trtree-index-assertion
branch
from
June 5, 2026 17:07
0af64ae to
fff43eb
Compare
estebanzimanyi
force-pushed
the
fix/bump-meos-pin
branch
from
June 5, 2026 17:13
40bf218 to
45df2ad
Compare
estebanzimanyi
force-pushed
the
fix/trtree-index-assertion
branch
from
June 5, 2026 17:15
fff43eb to
fbf9182
Compare
estebanzimanyi
force-pushed
the
fix/bump-meos-pin
branch
from
June 5, 2026 18:42
45df2ad to
2067f2a
Compare
estebanzimanyi
force-pushed
the
fix/trtree-index-assertion
branch
2 times, most recently
from
June 6, 2026 04:38
4995a85 to
bcbfe19
Compare
estebanzimanyi
force-pushed
the
fix/bump-meos-pin
branch
from
June 6, 2026 06:10
74ea89f to
e12394e
Compare
estebanzimanyi
force-pushed
the
fix/trtree-index-assertion
branch
2 times, most recently
from
June 6, 2026 06:35
02dfc34 to
9fd27c5
Compare
estebanzimanyi
force-pushed
the
fix/bump-meos-pin
branch
from
June 6, 2026 06:35
e12394e to
8d61366
Compare
estebanzimanyi
force-pushed
the
fix/trtree-index-assertion
branch
from
June 6, 2026 07:15
9fd27c5 to
784ab55
Compare
estebanzimanyi
force-pushed
the
fix/bump-meos-pin
branch
from
June 6, 2026 20:25
3e8da05 to
e5d0464
Compare
estebanzimanyi
force-pushed
the
fix/trtree-index-assertion
branch
from
June 6, 2026 23:48
784ab55 to
e2e32db
Compare
The TRTREE constructor accepted only stbox, tstzspan and tgeompoint columns and raised an InternalException (which DuckDB renders as a generic assertion-failure crash) for any other type. Dispatch the bounding-box flavour for stbox, tbox, the five span types and every temporal type (tint, tfloat, tbool, ttext, tgeompoint, tgeogpoint, tgeometry, tgeography), and raise a clean BinderException for genuinely unsupported columns. Construct already extracts the per-row bbox for temporal columns, so indexes_temporal is widened to match.
estebanzimanyi
force-pushed
the
fix/trtree-index-assertion
branch
from
July 29, 2026 07:43
e2e32db to
0d12fd3
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.