ray.data.expressions.StarExpr.get_type#

StarExpr.get_type(input_schema: pyarrow.Schema) pyarrow.DataType | None#

Resolve the output PyArrow data type given the input schema.

The default implementation converts self.data_type (the construction-time hint) to a PyArrow type. That’s the right answer for self-contained expressions (LiteralExpr, UDFExpr, DownloadExpr, MonotonicallyIncreasingIdExpr, RandomExpr, UUIDExpr).

Schema-dependent expressions (ColumnExpr, BinaryExpr, UnaryExpr, AliasExpr, StarExpr) override this to resolve against input_schema.

Returns None if the type cannot be statically determined (for example, a UDF without a declared return_dtype or a column not found in input_schema). Callers fall back to runtime inference (Dataset.schema() falling back to a limit(1) execution).