Skip to content

Commit

Permalink
Apply review suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
andy-slac committed Jul 31, 2024
1 parent fccccbd commit 2111e21
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions python/lsst/daf/butler/registry/dimensions/static.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,11 +384,18 @@ def make_spatial_join_relation(
existing_relationships: Set[frozenset[str]] = frozenset(),
) -> tuple[Relation, bool]:
# Docstring inherited.
overlap_relationship = frozenset(
self.universe[element1].required.names | self.universe[element2].required.names
)
if any(overlap_relationship.issubset(rel) for rel in existing_relationships):
group1 = self.universe[element1].minimal_group
group2 = self.universe[element2].minimal_group
overlap_relationships = {
frozenset(a | b)
for a, b in itertools.product(
[group1.names, group1.required],
[group2.names, group2.required],
)
}
if not overlap_relationships.isdisjoint(existing_relationships):
return context.preferred_engine.make_join_identity_relation(), False

overlaps: Relation | None = None
needs_refinement: bool = False
if element1 == self.universe.commonSkyPix.name:
Expand Down

0 comments on commit 2111e21

Please sign in to comment.