Skip to content

Commit

Permalink
Deprecate htm/healpix data IDs
Browse files Browse the repository at this point in the history
In the new query system, this functionality can be expressed more clearly using region overlaps.
  • Loading branch information
dhirving committed Oct 14, 2024
1 parent 4f00b4d commit 174d6b0
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions python/lsst/daf/butler/registry/queries/_structs.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
__all__ = ["QuerySummary"] # other classes here are local to subpackage

import dataclasses
import warnings
from collections.abc import Iterable, Mapping, Set
from typing import Any

Expand Down Expand Up @@ -393,6 +394,16 @@ def __init__(
self.order_by = None if order_by is None else OrderByClause.parse_general(order_by, requested)
self.limit = limit
self.columns_required, self.dimensions, self.region = self._compute_columns_required()
for dimension in self.where.data_id.dimensions.names:
if (
dimension.startswith("htm") or dimension.startswith("healpix")
) and not dimension == self.universe.commonSkyPix.name:
warnings.warn(
f"Queries using dimension '{dimension}' are deprecated."
" Use the region 'OVERLAPS' operator in the where clause instead."
" Will be removed after v28.",
FutureWarning,
)

requested: DimensionGroup
"""Dimensions whose primary keys should be included in the result rows of
Expand Down

0 comments on commit 174d6b0

Please sign in to comment.