Skip to content

Commit

Permalink
Belated SqlSelectBuilder method rename and typo fix.
Browse files Browse the repository at this point in the history
The class this method's old name referred to was renamed to
SqlJoinsBuilder in an earlier commit.
  • Loading branch information
TallJimbo committed Dec 9, 2024
1 parent d0fe08d commit d9c885b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion python/lsst/daf/butler/direct_query_driver/_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ def _resolve_union_datasets(
searches : `list` [ `ResolvedDatasetSearch` ]
Resolved dataset searches for all union dataset types with these
dimensions. Each item in the list groups dataset types with the
same colletion search path.
same collection search path.
"""
# Gather the filtered collection search path for each union dataset
# type.
Expand Down
4 changes: 2 additions & 2 deletions python/lsst/daf/butler/direct_query_driver/_sql_builders.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def join(self, other: SqlJoinsBuilder) -> SqlSelectBuilder:
self.joins.join(other)
return self

def into_from_builder(
def into_joins_builder(
self, cte: bool = False, force: bool = False, *, postprocessing: Postprocessing | None
) -> SqlJoinsBuilder:
"""Convert this builder into a `SqlJoinsBuilder`, nesting it in a
Expand Down Expand Up @@ -265,7 +265,7 @@ def nested(
object.
"""
return SqlSelectBuilder(
self.into_from_builder(cte=cte, force=force, postprocessing=postprocessing), columns=self.columns
self.into_joins_builder(cte=cte, force=force, postprocessing=postprocessing), columns=self.columns
)

def union_subquery(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1464,9 +1464,9 @@ def make_joins_builder(
# Need a UNION subquery.
return tags_builder.union_subquery([calibs_builder])
else:
return tags_builder.into_from_builder(postprocessing=None)
return tags_builder.into_joins_builder(postprocessing=None)
elif calibs_builder is not None:
return calibs_builder.into_from_builder(postprocessing=None)
return calibs_builder.into_joins_builder(postprocessing=None)
else:
raise AssertionError("Branch should be unreachable.")

Expand Down
6 changes: 3 additions & 3 deletions python/lsst/daf/butler/registry/dimensions/static.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ def make_joins_builder(self, element: DimensionElement, fields: Set[str]) -> Sql
self.make_joins_builder(element.implied_union_target, fields),
columns=qt.ColumnSet(element.minimal_group).drop_implied_dimension_keys(),
distinct=True,
).into_from_builder(postprocessing=None)
).into_joins_builder(postprocessing=None)
if not element.has_own_table:
raise NotImplementedError(f"Cannot join dimension element {element} with no table.")
table = self._tables[element.name]
Expand Down Expand Up @@ -1082,7 +1082,7 @@ def visit_spatial_constraint(
self.builder.join(
joins_builder.to_select_builder(
qt.ColumnSet(element.minimal_group).drop_implied_dimension_keys(), distinct=True
).into_from_builder(postprocessing=None)
).into_joins_builder(postprocessing=None)
)
# Short circuit here since the SQL WHERE clause has already
# been embedded in the subquery.
Expand Down Expand Up @@ -1147,7 +1147,7 @@ def visit_spatial_join(
qt.ColumnSet(a.minimal_group | b.minimal_group).drop_implied_dimension_keys(),
distinct=True,
)
.into_from_builder(postprocessing=None)
.into_joins_builder(postprocessing=None)
)
# In both cases we add postprocessing to check that the regions
# really do overlap, since overlapping the same common skypix
Expand Down

0 comments on commit d9c885b

Please sign in to comment.