Skip to content

Commit

Permalink
Document sort direction and null order in Iceberg
Browse files Browse the repository at this point in the history
  • Loading branch information
okumin authored and ebyhr committed Dec 21, 2024
1 parent 5f84a49 commit a401e37
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docs/src/main/sphinx/connector/iceberg.md
Original file line number Diff line number Diff line change
Expand Up @@ -1502,6 +1502,18 @@ CREATE TABLE example.customers.orders (
WITH (sorted_by = ARRAY['order_date'])
```

You can explicitly configure sort directions or null ordering in the following way:

```
CREATE TABLE example.customers.orders (
order_id BIGINT,
order_date DATE,
account_number BIGINT,
customer VARCHAR,
country VARCHAR)
WITH (sorted_by = ARRAY['order_date DESC NULLS FIRST', 'order_id ASC NULLS LAST'])
```

Sorting can be combined with partitioning on the same column. For example:

```
Expand Down

0 comments on commit a401e37

Please sign in to comment.