Skip to content

fix: skip tables without annotation metadata when filtering query results - #1263

Open
FarisHrvat wants to merge 1 commit into
scverse:mainfrom
FarisHrvat:query-skip-unannotated-table
Open

FarisHrvat wants to merge 1 commit into
scverse:mainfrom
FarisHrvat:query-skip-unannotated-table

Conversation

@FarisHrvat

Copy link
Copy Markdown

Fixes #1248

With filter_table=True, bounding box and polygon queries crashed on any table without spatialdata_attrs. Such a table doesn't annotate anything, so it's now dropped, the same as filter_by_coordinate_system does by default (include_orphan_tables=False).

bounding_box_query and polygon_query with filter_table=True crashed on any
table that has no spatialdata_attrs, even though such a table annotates
nothing. Drop it instead, the same as filter_by_coordinate_system does by
default (include_orphan_tables=False).

Fixes scverse#1248
@codecov

codecov Bot commented Sep 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.42%. Comparing base (ea93a37) to head (af76636).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1263      +/-   ##
==========================================
+ Coverage   91.40%   91.42%   +0.01%     
==========================================
  Files          53       53              
  Lines        8381     8381              
==========================================
+ Hits         7661     7662       +1     
+ Misses        720      719       -1     
Files with missing lines Coverage Δ
src/spatialdata/_core/query/relational_query.py 93.54% <100.00%> (+0.19%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

bounding_box_query(filter_table=True) crashes if the SpatialData object contains an orphan table

1 participant