Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

REST create_table omits partition spec-id; Java-based servers (Polaris) reject it

Open Beginner friendly
#3,469 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 4 days

@ahlag is already working on this.

Since Oct 17, 2026.

  • #3484 by @ahlag — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
66/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
rust
Domain
api

Research direction

Start in RestCatalog::create_table and at how UnboundPartitionSpec serializes its optional spec id, since the bug is that the field is omitted when unset. Check the serialized CreateTableRequest body for a partition spec with no with_spec_id call. Done when an unset spec id is sent as spec-id: 0 and a test asserts that body, with the Polaris repro from the issue as manual confirmation.

Written by the indexing model from the issue text.

Description

Apache Iceberg Rust version

0.10.1 (also present on main at 3bb8167)

Describe the bug

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
  1. Start Polaris 1.3.0 (in-memory persistence, bootstrap credentials) with an internal catalog.
  2. Create a table through RestCatalog with a partition spec built by UnboundPartitionSpec::builder().add_partition_field(...), without with_spec_id.
  3. Polaris answers 400.

The same request body replayed with curl:

  • "partition-spec": {"fields": [{"source-id": 27, "name": "receive_day", "transform": "day"}]} returns 400.
  • "partition-spec": {"spec-id": 0, "fields": [...]} returns 200.
  • 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.

Dominant language
Rust
Stars
1.4k
Forks
604
Avg merge
5d 11h
Merged PRs (30d)
59

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/iceberg-rust

All issues in apache/iceberg-rust

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.