sorting
NullOrder
¶
Bases: Enum
Source code in pyiceberg/table/sorting.py
__repr__()
¶
SortField
¶
Bases: IcebergBaseModel
Sort order field.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
source_id
|
int
|
Source column id from the table’s schema. |
None
|
transform
|
str
|
Transform that is used to produce values to be sorted on from the source column. This is the same transform as described in partition transforms. |
None
|
direction
|
SortDirection
|
Sort direction, that can only be either asc or desc. |
None
|
null_order
|
NullOrder
|
Null order that describes the order of null values when sorted. Can only be either nulls-first or nulls-last. |
None
|
Source code in pyiceberg/table/sorting.py
__str__()
¶
Return the string representation of the SortField class.
Source code in pyiceberg/table/sorting.py
SortOrder
¶
Bases: IcebergBaseModel
Describes how the data is sorted within the table.
Users can sort their data within partitions by columns to gain performance.
The order of the sort fields within the list defines the order in which the sort is applied to the data.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
fields
|
List[SortField]
|
The fields how the table is sorted. |
()
|
Other Parameters:
Name | Type | Description |
---|---|---|
order_id |
int
|
An unique id of the sort-order of a table. |