ray.data.expressions.StarExpr#

class ray.data.expressions.StarExpr[source]#

Bases: Expr

Expression that represents all columns from the input.

This is a special expression used in projections to indicate that all existing columns should be preserved at this position in the output. It’s typically used internally by operations like with_column() and rename_columns() to maintain existing columns.

Example

When with_column(“new_col”, expr) is called, it creates: Project(exprs=[star(), expr.alias(“new_col”)])

This means: keep all existing columns, then add/overwrite “new_col”

DeveloperAPI: This API may change across minor Ray releases.

Methods

alias

Rename the expression.

is_in

Check if the expression value is in a list of values.

is_not_null

Check if the expression value is not null.

is_null

Check if the expression value is null.

not_in

Check if the expression value is not in a list of values.

to_pyarrow

Convert this Ray Data expression to a PyArrow compute expression.

Attributes

name

Get the name associated with this expression.

data_type