Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta Adatta ai principianti
#3,469 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 3 giorni

@ninglinLiu ci sta già lavorando.

Dal 25/10/2026.

  • #3484 di @ahlag — chiusa senza merge
  • #3530 di @ninglinLiu — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
66/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
api

Direzione di ricerca

Inizia da RestCatalog::create_table e controlla come UnboundPartitionSpec serializza il suo spec id opzionale, poiché il bug consiste nel fatto che il campo viene omesso quando non è impostato. Controlla il body serializzato di CreateTableRequest per una partition spec senza chiamata a with_spec_id. È completato quando uno spec id non impostato viene inviato come spec-id: 0 e un test verifica quel body, con il repro di Polaris dell'issue come conferma manuale.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Rust
Stelle
1.4k
Fork
612
Merge medio
4g 6h
PR unite (30g)
83

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di apache/iceberg-rust

Tutte le issue di apache/iceberg-rust

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.