ColumnContainer¶
-
class
lsst.daf.relation.
ColumnContainer
¶ Bases:
abc.ABC
A abstract base class and factory for expressions that represent containers of multiple column values.
ColumnContainer
inheritance is closed to the types already provided by this package. These concrete types can all be constructed via factory methods onColumnContainer
itself, so the derived types themselves only need to be referenced when writingmatch
expressions that process an expression tree. See Extensibility for rationale and details.Attributes Summary
columns_required
Columns required by this expression ( Set
[ColumnTag
]).Methods Summary
contains
(item)Construct a boolean column expression that tests whether a scalar expression is present in this container expression. is_supported_by
(engine)Test whether the given engine is capable of evaluating this expression. range_literal
(r)Construct a container expression from a range of indices. sequence
(items, dtype)Construct a container expression from a sequence of item expressions. Attributes Documentation
-
columns_required
¶ Columns required by this expression (
Set
[ColumnTag
]).This includes columns required by expressions nested within this one.
Methods Documentation
-
contains
(item: ColumnExpression) → ColumnInContainer¶ Construct a boolean column expression that tests whether a scalar expression is present in this container expression.
Parameters: - item :
ColumnExpression
Item expression to test.
Returns: - contains :
ColumnInContainer
Boolean column expression that tests for membership in the container.
- item :
-
is_supported_by
(engine: Engine) → bool¶ Test whether the given engine is capable of evaluating this expression.
Parameters: - engine :
Engine
Engine to test.
Returns: - supported :
bool
Whether the engine supports this expression and all expressions nested within it.
- engine :
-
classmethod
range_literal
(r: range) → lsst.daf.relation._columns._container.ColumnRangeLiteral¶ Construct a container expression from a range of indices.
Parameters: - r :
range
Range object.
Returns: - container :
ColumnRangeLiteral
Container expression object representing the range.
- r :
-
classmethod
sequence
(items: Sequence[ColumnExpression], dtype: type | None = None) → ColumnExpressionSequence¶ Construct a container expression from a sequence of item expressions.
Parameters: - items :
Sequence
[ColumnExpression
] Sequence of item expressions.
- dtype :
type
, optional The Python type of the elements in the container.
Returns: - container :
ColumnExpressionSequence
Container expression object backed by the given items.
- items :
-