refactor `filter_table_by_elements`
I would like to refactor this function in order to support multiple tables.
Features
Let's say I have a region element shapes1, I would like to filter the table or tables that contain instances from that region. This filtering should have the following features:
- [ ] do not copy, but return a view
- [ ] optionally return a mapping
table_name -> instancesor the same list of tables
@melonora @LucaMarconato I have looked back at the multiple table in-memory design, but I couldn't find a clear description of any constraint or expected behaviour in the conversation or in the design document. In particular, from our previous conversations, I understood that:
- a table can map to multiple elements (e.g. diff views of the same annotation)
- a table can have rows that map to an element, and rows that don't map to any element
- a table can also not map to any element
can two tables map to the same element? Thanks for the clarification
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 91.88%. Comparing base (774b492) to head (1d0519e).
:warning: Report is 124 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #701 +/- ##
==========================================
+ Coverage 91.83% 91.88% +0.05%
==========================================
Files 44 44
Lines 6781 6780 -1
==========================================
+ Hits 6227 6230 +3
+ Misses 554 550 -4
| Files with missing lines | Coverage Δ | |
|---|---|---|
| src/spatialdata/_core/query/relational_query.py | 91.26% <100.00%> (+0.60%) |
:arrow_up: |
| src/spatialdata/_core/spatialdata.py | 90.94% <100.00%> (+0.05%) |
:arrow_up: |
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
Hi @giovp, yes 2 tables can map to the same element, that is no problem.