Skip to content

Update libspatialjoin to fix within-distance joins and DE-9IM results - #3246

Merged
hannahbast merged 2 commits into
masterfrom
update-spatialjoin
Aug 17, 2026
Merged

Update libspatialjoin to fix within-distance joins and DE-9IM results#3246
hannahbast merged 2 commits into
masterfrom
update-spatialjoin

Conversation

@hannahbast

@hannahbast hannahbast commented Aug 17, 2026

Copy link
Copy Markdown
Member

This change updates the pinned libspatialjoin to the current master. The update fixes three bugs in within-distance joins. The check between a point and a linestring reported every candidate from the padded bounding box as within distance, which returned all points in a large parallelogram around the linestring (fixed in ad-freiburg/util#11). The distance between a linestring and a polygon was too large by the Web-Mercator distortion factor (ad-freiburg/util#12). An integer overflow in distToSegment silently lost result pairs (ad-freiburg/util#13). The update also fixes duplicate and contradictory DE-9IM results for byte-identical geometries (ad-freiburg/spatialjoin#23).

Some hardcoded distances in the tests change slightly because point-point distances are now computed with an exact haversine formula on Web-Mercator coordinates.

…ults

This change updates the pinned `libspatialjoin` to the current master.
The update fixes three bugs in `within-distance` joins. The check between
a point and a linestring reported every candidate from the padded
bounding box as within distance, which returned all points in a large
parallelogram around the linestring (fixed in ad-freiburg/util#11). The
distance between a linestring and a polygon was too large by the
Web-Mercator distortion factor (ad-freiburg/util#12). An integer
overflow in `distToSegment` silently lost result pairs
(ad-freiburg/util#13). The update also fixes duplicate and contradictory
DE-9IM results for byte-identical geometries (ad-freiburg/spatialjoin#23).

Some hardcoded distances in the tests change slightly because
point-point distances are now computed with an exact haversine formula
on Web-Mercator coordinates.
Copilot AI lite review requested due to automatic review settings August 17, 2026 11:01
@hannahbast
hannahbast requested a review from ullingerc August 17, 2026 11:07
@hannahbast hannahbast changed the title Update libspatialjoin to fix within-distance joins and DE-9IM results Update libspatialjoin to fix within-distance joins and DE-9IM results [TRIVIAL] Aug 17, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This pull request updates QLever’s pinned libspatialjoin dependency to a newer upstream commit that fixes several correctness issues in within-distance joins and DE-9IM relation results, and aligns existing tests with the updated distance calculations.

Changes:

  • Bump the fetched ad-freiburg/spatialjoin commit in CMakeLists.txt.
  • Update expected point-to-point distance values in GeoSparqlHelpersTest to match the refined distance computation.
  • Adjust expected WITHIN_DIST distances in SpatialJoinPrefilterTest to match the new upstream behavior.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
CMakeLists.txt Updates the pinned spatialjoin commit hash used via FetchContent.
test/GeoSparqlHelpersTest.cpp Updates expected distances for WKT point distance tests.
test/engine/SpatialJoinPrefilterTest.cpp Updates expected within-distance result distances in spatial join prefilter tests.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@ullingerc ullingerc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you very much

@sparql-conformance

Copy link
Copy Markdown

Overview

Suite Total Passed ✅ Intended ✅ Failed ❌ Not Tested
SPARQL 1.1 555 457 73 22 3
SPARQL 1.0 482 340 55 87 0
Total 1037 797 128 109 3

Conformance check passed ✅

No test result changes.

📋 Details: View full comparison

@codecov

codecov Bot commented Aug 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.48%. Comparing base (62564d8) to head (241eed5).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3246      +/-   ##
==========================================
- Coverage   94.48%   94.48%   -0.01%     
==========================================
  Files         563      563              
  Lines       47946    47946              
  Branches     6886     6886              
==========================================
- Hits        45304    45300       -4     
- Misses       1572     1574       +2     
- Partials     1070     1072       +2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sonarqubecloud

Copy link
Copy Markdown

@hannahbast hannahbast changed the title Update libspatialjoin to fix within-distance joins and DE-9IM results [TRIVIAL] Update libspatialjoin to fix within-distance joins and DE-9IM results Aug 17, 2026
@hannahbast
hannahbast merged commit 02af090 into master Aug 17, 2026
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants