New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DM-36326: Simplify materialized skypix overlaps. #739
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, few minor comments.
@@ -125,28 +120,12 @@ def initialize( | |||
table = context.addTable(element.name, spec) | |||
else: | |||
table = db.ensureTableExists(element.name, spec) | |||
skyPixOverlap: _SkyPixOverlapStorage | None | |||
skypix_overlap_tables: _SkyPixOverlapTables | None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this declaration do anything useful?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch; it does not.
return result | ||
|
||
def connect(self, overlaps: DatabaseDimensionOverlapStorage) -> None: | ||
# Docstring inherited from DatabaseDimensionRecordStorage. | ||
self._otherOverlaps.append(overlaps) | ||
|
||
def _on_governor_insert(self, record: DimensionRecord) -> None: | ||
"""A `GovernorDimensionRecordStorage.registerInsertionListener callback |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Closing backtick is missing.
Record storage backend for this element's governor dimension. | ||
Parameters | ||
---------- | ||
records : `Sequence` [ `DimensionElement` ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DimensionElement -> DimensionRecord?
to require users to explicitly materialize all relationships they will | ||
want to use in queries. | ||
This class (and the related methods in TableDimensionRecordStorage) can in | ||
principle manage overlaps between with any skypix dimension, but at present |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
between with ?
We were maintaining a lot of unused, probably too-clever code for dealing with spatial overlaps between regular database dimension elements and arbitrary skypix dimensions, while only overlaps with the common skypix dimension are actually supported everywhere else. This commit drops that extra complexity, and with it an undesirable dependency on GovernorDimensionRecordStorage.values (which I'd like to remove) and some unnecessary table locking.
e0e24c4
to
d976a5a
Compare
Codecov ReportBase: 84.74% // Head: 84.79% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #739 +/- ##
==========================================
+ Coverage 84.74% 84.79% +0.04%
==========================================
Files 254 254
Lines 32960 32911 -49
Branches 5639 5618 -21
==========================================
- Hits 27933 27907 -26
+ Misses 3802 3783 -19
+ Partials 1225 1221 -4
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
We were maintaining a lot of unused, probably too-clever code for dealing with spatial overlaps between regular database dimension elements and arbitrary skypix dimensions, while only overlaps with the common skypix dimension are actually supported everywhere else.
This commit drops that extra complexity, and with it an undesirable dependency on GovernorDimensionRecordStorage.values (which I'd like to remove) and some unnecessary table locking.
Checklist
doc/changes