REST: Send empty first-page pageToken when rest-page-size is set
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 82/100
Direzione di ricerca
Inizia dal codice di paginazione del catalogo REST per list_tables, list_views e list_namespaces, quindi esamina il parsing della query dell’adattatore SigV4. Invia un pageToken vuoto nella prima richiesta quando è impostato rest-page-size e conserva nell’adattatore i valori di query vuoti. Verifica che la richiesta includa pageToken= e che la paginazione funzioni con una dimensione di pagina pari a 1.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Apache Iceberg version
0.12.0 (latest release)
Please describe the bug 🐞
When rest-page-size is set, list_tables, list_views and list_namespaces send pageSize without pageToken on the first request:
GET /v1/namespaces/ns/tables?pageSize=100
The REST spec says servers must return all results in one response when pageToken is not set, and that clients start pagination by sending an empty pageToken (PageToken). So compliant servers ignore rest-page-size, and some servers fail on the request. With tabulario/iceberg-rest:1.6.0 and namespaces a, b, c:
RestCatalog("t", uri=uri).list_namespaces()
# [('a',), ('b',), ('c',)]
RestCatalog("t", uri=uri, **{"rest-page-size": "1"}).list_namespaces()
# ServerError: NumberFormatException: Cannot parse null string
GET /v1/namespaces?pageSize=1 -> 500 NumberFormatException
GET /v1/namespaces?pageSize=1&pageToken= -> {"namespaces": [["a"]], "next-page-token": "1"}
The first request should include pageToken= when rest-page-size is set. The Java client always sends pageToken, starting with an empty value. The SigV4 adapter also needs to keep blank query values, since parse_qsl drops them by default.
rest-page-size was added in #3377. The same error in apache/iceberg-rest-fixture was reported in apache/iceberg#13119.
Willingness to contribute
- I can contribute a fix for this bug independently
- I would be willing to contribute a fix for this bug with guidance from the Iceberg community
- I cannot contribute a fix for this bug at this time
- Lingua principale
- Python
- Stelle
- 1.2k
- Fork
- 618
- Merge medio
- 1g 3h
- PR unite (30g)
- 45
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di apache/iceberg-python
-
CLI: --output=json list-refs emits one object per retention property instead of per refForse già presa @tomron l’ha presa 1 giorno fa. Apertakind:bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 87/100
apache/iceberg-python#4098 ·
I maintainer di solito rispondono entro 1 giorno
-
PyArrowFileIO: every small S3 write is a 3-request multipart upload; expose allow_delayed_openAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
apache/iceberg-python#4093 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
View does not expose metadata_location: RestCatalog.load_view discards it from the server's responseForse già presa @Soumo-git-hub l’ha presa 7 giorni fa. Apertakind:bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
apache/iceberg-python#4073 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
apache/iceberg-python#4010 · 3 commenti · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
to_bytes silently rescales a Decimal with a negative scaleForse già presa @Rodrigo-Palma l’ha presa 26 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
apache/iceberg-python#3996 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di apache/iceberg-python
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
-
[Bug]: Importing weave changes the process-wide localeForse già presa @himanshu748 l’ha presa oggi. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
-
UX
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
mediajunkie/piper-morgan-product#2008 · 2 commenti ·