lawofcycles opened a new issue, #2606:
URL: https://github.com/apache/iceberg-python/issues/2606

   ### Apache Iceberg version
   
   None
   
   ### Please describe the bug 🐞
   
   ## Description
   The `pyiceberg describe` command fails when using AWS Glue REST catalog with 
multi-element identifiers (e.g., `namespace.table`). The command incorrectly 
attempts to interpret the entire identifier as a namespace, causing AWS Glue to 
return a 400 Bad Request error.
   
   ## Steps to Reproduce
   1. Configure PyIceberg with AWS Glue REST catalog
   2. Run: `pyiceberg describe namespace.table`
   3. Command fails with: `IllegalArgumentException: Invalid namespace name`
   
   ## Expected Behavior
   The command should successfully describe the table, falling back from 
namespace to table interpretation when the namespace lookup fails.
   
   ## Actual Behavior
   The command fails with an unhandled BadRequestError because AWS Glue returns 
400 for malformed namespace names containing the unit separator character 
(`\x1f`).
   
   ## Root Cause
   Different REST catalog implementations handle invalid namespace formats 
differently:
   - Some implementations: Return 404 Not Found for non-existent namespaces
   - AWS Glue REST implementation: Returns 400 Bad Request for malformed 
namespace formats
   
   The `load_namespace_properties` method only handles 404 errors, causing 
failures with implementations that return 400 for invalid formats.
   
   ## Proposed Solution
   Treat 400 Bad Request errors the same as 404 Not Found in 
`load_namespace_properties`, as both indicate the namespace doesn't exist (one 
due to format, one due to absence).
   
   ### Willingness to contribute
   
   - [x] 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


-- 
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