iceberg-python icon indicating copy to clipboard operation
iceberg-python copied to clipboard

Rest Catalog: table_exist does not succeed on 204 response code

Open c-thiel opened this issue 1 year ago • 2 comments

Apache Iceberg version

main (development)

Please describe the bug 🐞

Currently table_exists only returns true on 200: https://github.com/apache/iceberg-python/blob/20b7b5339a1a0ab59d884c7d042c4bc96a166b11/pyiceberg/catalog/rest.py#L793

According to the spec, it should return true on 204 (and probably 200 as well): https://github.com/apache/iceberg/blob/ea916c1700ef37377d3e8bba1197b3fe32d1a248/open-api/rest-catalog-open-api.yaml#L820-L829

c-thiel avatar May 14 '24 13:05 c-thiel

@c-thiel Great catch! I agree, let's accept both 200 and 204. Are you interested in fixing this?

Fokko avatar May 14 '24 13:05 Fokko

Sure - PR is coming. I'll have some more tricky great catches tomorrow ;)

c-thiel avatar May 14 '24 21:05 c-thiel