You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RestCatalog::create_table serializes the partition spec without spec-id when the UnboundPartitionSpec has none set. Since #2610, unset ids are omitted rather than sent as null.
Servers that parse the request with Iceberg Java's PartitionSpecParser require spec-id. For example, Apache Polaris 1.3.0 rejects the request with a bare HTTP 400 Bad Request (WebApplicationException) and logs nothing that points to the cause. Building the spec with .with_spec_id(0) makes the same request succeed.
#2702 notes the same parser behaviour for TableUpdate::AddSpec on the commit path. The create-table path hits it too.
To Reproduce
Start Polaris 1.3.0 (in-memory persistence, bootstrap credentials) with an internal catalog.
Create a table through RestCatalog with a partition spec built by UnboundPartitionSpec::builder().add_partition_field(...), without with_spec_id.
Adding a field-id without spec-id still returns 400.
Expected behavior
A table created through the REST catalog with an unbound partition spec is accepted by Java-based REST servers. One option is to send spec-id: 0 in CreateTableRequest when it is unset, since a new table's first spec is always 0.
Willingness to contribute
Happy to test a fix against Polaris.
AI disclosure: drafted with an AI coding assistant; reproduced and verified by me.
I'd like to take this. Draft fix in #3484: create_table now sends spec-id: 0 when the partition spec has none, applied where the request is built so TableUpdate::AddSpec serialization is unchanged, and test_create_table now checks the request body. I'll mark it ready for review once CI passes.
Activity
ahlag commentedon Oct 17, 2026
I'd like to take this. Draft fix in #3484:
create_tablenow sendsspec-id: 0when the partition spec has none, applied where the request is built soTableUpdate::AddSpecserialization is unchanged, andtest_create_tablenow checks the request body. I'll mark it ready for review once CI passes.