lawofcycles opened a new pull request, #2607:
URL: https://github.com/apache/iceberg-python/pull/2607

   The PyIceberg CLI `describe` command fails with AWS Glue REST catalog when 
interpreting multi-element identifiers.
   
   ## Problem
   ```bash
   $ pyiceberg describe tpcds_iceberg_standard.call_center
   IllegalArgumentException: Invalid namespace name.
   ```
   
   When PyIceberg queries a multi-level namespace, it joins the parts with 
`\x1f` (ASCII Unit Separator) as per the Iceberg REST specification. For 
example, `("namespace", "table")` becomes `namespace\x1ftable` in the REST 
request. AWS Glue returns 400 Bad Request for this format, but the current code 
only handles 404 errors.
   
   ## Solution
   Extended `load_namespace_properties` to handle both 400 and 404 as 
`NoSuchNamespaceError`:
   
   ```python
   _handle_non_200_response(exc, {404: NoSuchNamespaceError, 400: 
NoSuchNamespaceError})
   ```
   
   ### Why not change the separator?
   While using `.` instead of `\x1f` (Unit Separator) would make AWS Glue 
return 404, changing the namespace separator would be a breaking change to the 
Iceberg REST specification compliance and affect all existing REST catalog 
implementations. This fix preserves compatibility by handling the error at the 
client level.
   
   Closes #2606
   
   ## Are these changes tested?
   - Added unit test for 400 error handling
   - Verified with AWS Glue REST catalog
   - All existing tests pass
   
   ## Are there any user-facing changes?
   No


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to