[I] CLI: `describe .` reports "namespace does not exist" when only the table is missing [iceberg-go]

Tue, 03 Nov 2026 16:20:15 -0800


Shruthirdy opened a new issue, #2423:
URL: https://github.com/apache/iceberg-go/issues/2423

   ### Apache Iceberg version
   
   main (development)
   
   ### Please describe the bug 🐞
   
   When `describe` is run without the `table`/`namespace` keyword and the table 
doesn't exist, the error says the namespace doesn't exist, even when it does.
   
   ### Repro
   
   With namespace `demo` present and no table `demo.test`:
   
   ```
   $ iceberg list
   demo
   
   $ iceberg describe demo.test
   namespace does not exist: table or namespace does not exist: [demo test]
   
   $ iceberg describe table demo.test
   table does not exist: [demo test]
   ```
   
   `describe demo.test` should report the missing table, consistent with 
`describe table demo.test`.
   
   The current message also repeats "does not exist" and shows the name as 
`[demo test]` instead of `demo.test`.
   
   Without a keyword, `describe()` in `cmd/iceberg/main.go` looks up a 
namespace first and then a table. If both return "not found", the final 
fallback always wraps `catalog.ErrNoSuchNamespace`. This fallback is only 
reached after the table lookup has also returned `ErrNoSuchTable`, so 
`ErrNoSuchTable` is the apt error to report.
   
   Proposed fix: Wrap `catalog.ErrNoSuchTable` and print the dotted name:
   
   ```
   table does not exist: no table or namespace named demo.test
   ```
   
   Test: Added a new unit test in describe_test.go file (new) for this case and 
clearly print if table is missing.
   
   I'd like to work on this. I have a fix and a unit test ready, and I'm happy 
to adjust the approach based on feedback.
   


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