Use inner join for cells to mapping/geom in spatial units
Closes #5360
I have:
- [x] Formatted any Python files with black
- [x] Brought the branch up to date with master
- [x] Added any relevant Github labels
- [ ] Added tests for any new additions
- [ ] Added or updated any relevant documentation
- [ ] Added an Architectural Decision Record (ADR), if appropriate
- [ ] Added an MPLv2 License Header if appropriate
- [x] Updated the Changelog
Description
Uses an inner join in GeomSpatialUnit (as was already the case in PolygonSpatialUnit) to join the cells table to the mapping/geom table, so that queries using a spatial unit do not include events at cells that don't map to any location.
The join from mapping table to geom table (if a mapping table is specified) is still a left join, so cell IDs for specific unmapped cells can still be explicitly included by including corresponding rows in the mapping table that don't map to any geom.
Test summary
Run details
| Project | FlowAuth |
| Status | Passed |
| Commit | acda2f7757 |
| Started | Sep 5, 2022 10:39 AM |
| Ended | Sep 5, 2022 10:52 AM |
| Duration | 13:15 💡 |
| OS | Linux Debian - 10.5 |
| Browser | Electron 100 |
View run in Cypress Dashboard ➡️
This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard
Codecov Report
Merging #5361 (acda2f7) into master (6755501) will decrease coverage by
17.01%. The diff coverage isn/a.
@@ Coverage Diff @@
## master #5361 +/- ##
===========================================
- Coverage 93.65% 76.63% -17.02%
===========================================
Files 277 277
Lines 10847 10847
Branches 1284 1284
===========================================
- Hits 10159 8313 -1846
- Misses 559 2286 +1727
- Partials 129 248 +119
| Impacted Files | Coverage Δ | |
|---|---|---|
| flowmachine/flowmachine/core/spatial_unit.py | 59.42% <ø> (-36.07%) |
:arrow_down: |
| autoflow/autoflow/app.py | 0.00% <0.00%> (-100.00%) |
:arrow_down: |
| ...e/flowmachine/core/sqlalchemy_table_definitions.py | 0.00% <0.00%> (-100.00%) |
:arrow_down: |
| ...wmachine/features/subscriber/active_subscribers.py | 0.00% <0.00%> (-100.00%) |
:arrow_down: |
| ...ne/features/subscriber/per_subscriber_aggregate.py | 0.00% <0.00%> (-100.00%) |
:arrow_down: |
| ...e/features/utilities/unique_values_from_queries.py | 0.00% <0.00%> (-100.00%) |
:arrow_down: |
| ...owmachine/features/utilities/feature_collection.py | 23.80% <0.00%> (-76.20%) |
:arrow_down: |
| flowmachine/flowmachine/core/server/utils.py | 27.27% <0.00%> (-72.73%) |
:arrow_down: |
| flowmachine/flowmachine/core/geotable.py | 28.57% <0.00%> (-71.43%) |
:arrow_down: |
| ...flowmachine/features/subscriber/distance_series.py | 30.00% <0.00%> (-70.00%) |
:arrow_down: |
| ... and 118 more |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more