gravitino.api.rel.table.Table

class gravitino.api.rel.table.Table

Bases: Auditable

An interface representing a table in a Namespace.

It defines the basic properties of a table. A catalog implementation with TableCatalog should implement this interface.

__init__()

Methods

__init__()

audit_info()

columns()

Gets the columns of the table.

comment()

Gets the comment of the table.

distribution()

Gets the bucketing of the table.

index()

Gets the indexes of the table.

name()

Gets name of the table.

partitioning()

Gets the physical partitioning of the table.

properties()

Gets the properties of the table.

sort_order()

Gets the sort order of the table.

abstract columns() list[gravitino.api.rel.column.Column]

Gets the columns of the table.

Returns:

list[Column]: The columns of the table.

comment() str | None

Gets the comment of the table.

Returns:
str (optional):

The comment of the table. None is returned if no comment is set.

distribution() Distribution

Gets the bucketing of the table.

Returns:
Distribution:

The bucketing of the table. If no bucketing is specified, Distribution.NONE is returned.

index() list[gravitino.api.rel.indexes.index.Index]

Gets the indexes of the table.

Returns:
list[Index]:

The indexes of the table. If no indexes are specified, Indexes.EMPTY_INDEXES is returned.

abstract name() str

Gets name of the table.

Returns:

str: Name of the table.

partitioning() list[gravitino.api.rel.expressions.transforms.transform.Transform]

Gets the physical partitioning of the table.

Returns:

list[Transform]: The physical partitioning of the table.

properties() dict[str, str]

Gets the properties of the table.

Returns:
dict[str, str]:

The properties of the table. Empty dictionary is returned if no properties are set.

sort_order() list[gravitino.api.rel.expressions.sorts.sort_order.SortOrder]

Gets the sort order of the table.

Returns:
list[SortOrder]:

The sort order of the table. If no sort order is specified, an empty list is returned.