expressions#

2026-03-11

20 min read time

Applies to Linux

pylibhipdf.expressions.ASTOperator#

alias of ast_operator

class pylibhipdf.expressions.ColumnNameReference#

Bases: Expression

An expression referring to data from a column in a table.

For details, see cudf::ast::column_name_reference.

Parameters#

column_namestr

Name of this column in the table metadata (provided when the expression is evaluated).

class pylibhipdf.expressions.ColumnReference#

Bases: Expression

An expression referring to data from a column in a table.

For details, see cudf::ast::column_reference.

Parameters#

indexsize_type

The index of this column in the table (provided when the expression is evaluated).

table_sourceTableReference, default TableReferenece.LEFT

Which table to use in cases with two tables (e.g. joins)

class pylibhipdf.expressions.Expression#

Bases: object

The base class for all expression types. This class cannot be instantiated directly, please instantiate one of its child classes instead.

For details, see cudf::ast::expression.

class pylibhipdf.expressions.Literal#

Bases: Expression

A literal value used in an abstract syntax tree.

For details, see cudf::ast::literal.

Parameters#

valueScalar

The Scalar value of the Literal. Must be either numeric, string, or a timestamp/duration scalar.

class pylibhipdf.expressions.Operation#

Bases: Expression

An operation expression holds an operator and zero or more operands.

For details, see cudf::ast::operation.

Parameters#

op : Operator left : Expression

Left input expression (left operand)

right: Expression, default None

Right input expression (right operand). You should only pass this if the input expression is a binary operation.

pylibhipdf.expressions.TableReference#

alias of table_reference

pylibhipdf.expressions.to_expression(unicode expr, tuple column_names)#

Create an expression for pylibcudf.transform.compute_column.

Parameters#

exprstr

The expression to evaluate. In (restricted) Python syntax.

column_namestuple[str]

Ordered tuple of names. When calling compute_column on the resulting expression, the provided table must have columns in the same order as given here.

Notes#

This function keeps a small cache of recently used expressions.

Returns#

Expression

Expression for the given expr and col_names