gravitino.api.function.function_column.FunctionColumn

class gravitino.api.function.function_column.FunctionColumn(name: str, data_type: Type, comment: str | None = None)

Bases: object

Represents a return column of a table-valued function.

__init__(name: str, data_type: Type, comment: str | None = None)

Create a FunctionColumn instance.

Args:

name: The column name. data_type: The column type. comment: The optional comment of the column.

Raises:

ValueError: If name is null or empty, or data_type is null.

Methods

__init__(name, data_type[, comment])

Create a FunctionColumn instance.

comment()

Returns the optional column comment, None if not provided.

data_type()

Returns the column type.

name()

Returns the column name.

of(name, data_type[, comment])

Create a FunctionColumn instance.

comment() str | None

Returns the optional column comment, None if not provided.

data_type() Type

Returns the column type.

name() str

Returns the column name.

classmethod of(name: str, data_type: Type, comment: str | None = None) FunctionColumn

Create a FunctionColumn instance.

Args:

name: The column name. data_type: The column type. comment: The optional comment of the column.

Returns:

A FunctionColumn instance.