gravitino.api.rel.table_change.RenameColumn

final class gravitino.api.rel.table_change.RenameColumn(_field_name: list[str], _new_name: str)

Bases: ColumnChange

A TableChange to rename a field.

The name is used to find the field to rename. The new name will replace the leaf field name. For example, rename_column(“a.b.c”, “x”) should produce column a.b.x.

If the field does not exist, the change must result in an IllegalArgumentException.

__init__(_field_name: list[str], _new_name: str) None

Methods

__init__(_field_name, _new_name)

field_name()

Retrieves the field name of the column to be modified.

get_field_name()

Retrieves the hierarchical field name of the column to be renamed.

get_new_name()

Retrieves the new name for the column.

field_name() list[str]

Retrieves the field name of the column to be modified.

Returns:
list[str]:

A list of strings representing the field name.

get_field_name() list[str]

Retrieves the hierarchical field name of the column to be renamed.

Returns:

list[str]: The field name of the column to be renamed.

get_new_name() str

Retrieves the new name for the column.

Returns:

str: The new name of the column.