ColumnReference¶
- class lsst.daf.relation.ColumnReference(tag: ColumnTag, dtype: type | None)¶
- Bases: - ColumnExpression- A concrete column expression that refers to a relation column. - Attributes Summary - Methods Summary - eq(other)- Construct a boolean equality-comparison expression. - function(name, *args[, dtype, ...])- Construct an expression that represents a function call with expression arguments. - ge(other)- Construct a boolean greater-or-equal-comparison expression. - gt(other)- Construct a boolean greater-than-comparison expression. - is_supported_by(engine)- Test whether the given engine is capable of evaluating this expression. - le(other)- Construct a boolean less-or-equal-comparison expression. - literal(value[, dtype])- Construct an expression backed by a regular Python object. - lt(other)- Construct a boolean less-than-comparison expression. - method(name, *args[, dtype, ...])- Construct an expression that represents a method call with expression arguments. - ne(other)- Construct a boolean inequality-comparison expression. - predicate_function(name, *args[, ...])- Construct an expression that represents a function call with expression arguments and a boolean result. - predicate_method(name, *args[, ...])- Construct an expression that represents a method call with expression arguments and a boolean result. - reference(tag[, dtype])- Construct an expression that refers to a column in a relation. - Attributes Documentation - columns_required¶
 - Methods Documentation - eq(other: ColumnExpression) PredicateFunction¶
- Construct a boolean equality-comparison expression. - Parameters:
- otherColumnExpression
- Expression whose value will be compared to that of - self.
 
- other
- Returns:
- comparisonPredicate
- Boolean column expression. 
 
- comparison
 
 - classmethod function(name: str, *args: ColumnExpression, dtype: type | None = None, supporting_engine_types: Iterable[type[Engine]] | None = None) ColumnFunction¶
- Construct an expression that represents a function call with expression arguments. - Parameters:
- namestr
- Name of the method, to be interpreted by the - Engineor other algorithm.
- *argsColumnExpression
- Expressions to pass as arguments to the method (not including - self; this is a- classmethod, so it never has access to- self).
- dtypetypeorNone, optional
- The Python type this expression evaluates to ( - typeor- None).
- supporting_engine_typesIterable[type], optional
- If provided, the set of - Enginetypes that are expected to support this expression. If- None(default), all engines are assumed to support it.
 
- name
- Returns:
- functionColumnFunction
- Column expression that represents this function call. 
 
- function
 
 - ge(other: ColumnExpression) PredicateFunction¶
- Construct a boolean greater-or-equal-comparison expression. - Parameters:
- otherColumnExpression
- Expression whose value will be compared to that of - self.
 
- other
- Returns:
- comparisonPredicate
- Boolean column expression. 
 
- comparison
 
 - gt(other: ColumnExpression) PredicateFunction¶
- Construct a boolean greater-than-comparison expression. - Parameters:
- otherColumnExpression
- Expression whose value will be compared to that of - self.
 
- other
- Returns:
- comparisonPredicate
- Boolean column expression. 
 
- comparison
 
 - is_supported_by(engine: Engine) bool¶
- Test whether the given engine is capable of evaluating this expression. 
 - le(other: ColumnExpression) PredicateFunction¶
- Construct a boolean less-or-equal-comparison expression. - Parameters:
- otherColumnExpression
- Expression whose value will be compared to that of - self.
 
- other
- Returns:
- comparisonPredicate
- Boolean column expression. 
 
- comparison
 
 - classmethod literal(value: Any, dtype: type | None = None) ColumnLiteral¶
- Construct an expression backed by a regular Python object. - Parameters:
- Returns:
- literalColumnLiteral
- A column expression backed by the given value. 
 
- literal
 
 - lt(other: ColumnExpression) PredicateFunction¶
- Construct a boolean less-than-comparison expression. - Parameters:
- otherColumnExpression
- Expression whose value will be compared to that of - self.
 
- other
- Returns:
- comparisonPredicate
- Boolean column expression. 
 
- comparison
 
 - method(name: str, *args: ColumnExpression, dtype: type | None = None, supporting_engine_types: Iterable[type[Engine]] | None = None) ColumnFunction¶
- Construct an expression that represents a method call with expression arguments. - Parameters:
- namestr
- Name of the method, to be interpreted by the - Engineor other algorithm.
- *argsColumnExpression
- Expressions to pass as arguments to the method (after - self).
- dtypetypeorNone, optional
- The Python type this expression evaluates to ( - typeor- None).
- supporting_engine_typesIterable[type], optional
- If provided, the set of - Enginetypes that are expected to support this expression. If- None(default), all engines are assumed to support it.
 
- name
- Returns:
- functionColumnFunction
- Column expression that represents this function call. 
 
- function
 - Notes - ColumnExpressioncannot actually force an engine to interpret the given name as the name of a method rather than something else; calling this method like this:- a.method("name", b) - is exactly equivalent to: - ColumnExpression.function("name", a, b) - The provided - iterationand- sqlengines both interpret these names as method names if and only if they are not first found in the built-in- operatormodule.
 - ne(other: ColumnExpression) PredicateFunction¶
- Construct a boolean inequality-comparison expression. - Parameters:
- otherColumnExpression
- Expression whose value will be compared to that of - self.
 
- other
- Returns:
- comparisonPredicate
- Boolean column expression. 
 
- comparison
 
 - classmethod predicate_function(name: str, *args: ColumnExpression, supporting_engine_types: Iterable[type[Engine]] | None = None) PredicateFunction¶
- Construct an expression that represents a function call with expression arguments and a boolean result. - Parameters:
- namestr
- Name of the method, to be interpreted by the - Engineor other algorithm.
- *argsColumnExpression
- Expressions to pass as arguments to the method (not including - self; this is a- classmethod, so it never has access to- self).
- dtypetypeorNone, optional
- The Python type this expression evaluates to ( - typeor- None).
- supporting_engine_typesIterable[type], optional
- If provided, the set of - Enginetypes that are expected to support this expression. If- None(default), all engines are assumed to support it.
 
- name
- Returns:
- functionPredicateFunction
- Boolean column expression that represents this function call. 
 
- function
 
 - predicate_method(name: str, *args: ColumnExpression, supporting_engine_types: Set[type[Engine]] | None = None) PredicateFunction¶
- Construct an expression that represents a method call with expression arguments and a boolean result. - Parameters:
- namestr
- Name of the method, to be interpreted by the - Engineor other algorithm.
- *argsColumnExpression
- Expressions to pass as arguments to the method (after - self).
- dtypetypeorNone, optional
- The Python type this expression evaluates to ( - typeor- None).
- supporting_engine_typesIterable[type] optional
- If provided, the set of - Enginetypes that are expected to support this expression. If- None(default), all engines are assumed to support it.
 
- name
- Returns:
- functionPredicateFunction
- Boolean column expression that represents this function call. 
 
- function
 - Notes - ColumnExpressioncannot actually force an engine to interpret the given name as the name of a method rather than something else; calling this method like this:- a.predicate_method("name", b) - is exactly equivalent to: - ColumnExpression.predicate_function("name", a, b) - The provided - iterationand- sqlengines both interpret these names as method names if and only if they are not first found in the built-in- operatormodule.
 - classmethod reference(tag: ColumnTag, dtype: type | None = None) ColumnReference¶
- Construct an expression that refers to a column in a relation.