Skip to content

Commit

Permalink
Update create table doc to clarify ID re-assignment (#1072)
Browse files Browse the repository at this point in the history
Copying over a similar sentence from the Java docs: https://iceberg.apache.org/docs/1.5.1/java-api-quickstart/#create-a-schema. Based on my reading of the catalog code, this is true as all the `create_table` implementations end up calling `assign_fresh_schema_ids`, `assign_fresh_partition_spec_ids`, and `assign_fresh_sort_order_ids`.

This is useful to understand so newcomers don't have to worry about ID management in any new schemas they are sending into `create_table`.
  • Loading branch information
paulcichonski authored Aug 20, 2024
1 parent ecc858e commit 166e7bb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mkdocs/docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ catalog.create_table(
)
```

When the table is created, all IDs in the schema are re-assigned to ensure uniqueness.

To create a table using a pyarrow schema:

```python
Expand Down

0 comments on commit 166e7bb

Please sign in to comment.