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

   ### Apache Iceberg version
   
   0.6.0 (latest release)
   
   ### Please describe the bug 🐞
   
   During the development of a new feature I encountered a behaviour in the 
implementation of the SqlCatalog that currently we are using as test catalog 
and I think is a bug. 
   
   In the documentation of the abstract method list_namespace_properties there 
is a reference to an exception being thrown if the namespace does not exist, 
but the current implementation  of SqlCatalog returns an empty dict when the 
namespace does not exist instead of raising the exception. 
   
   In this way the catalogs, although part of the same "interface" work and 
function in two completely different ways.
   
   ## How to reproduce it
   
   ```python
       def test_find_namespace(self):
           #initialize in memory sql catalog
           props = {
               "uri": "sqlite+pysqlite:///:memory:",
               "warehouse": f"file://tmp/test_catalog",
           }
           catalog = SqlCatalog("test_catalog", **props)
   
           #create a namespace
           catalog.create_namespace("existing_namespace")
   
           #retrieve properties for the created namespace
           existing_namespace = 
catalog.load_namespace_properties("existing_namespace")
   
           #retrieve properties for not existing namespace
           not_existing_namespace = 
catalog.load_namespace_properties("not_existing_namespace")
   
           self.assertEqual(existing_namespace,{"exists":"true"})
           self.assertEqual(not_existing_namespace,{})
   
   ```
   
   ## Expected behavior
   
   As described in the abstract method documentation, the expected behavior is 
to raise a NoSucheNameSpaceError exception. 
   the same behavior indeed is also implemented in the GlueCatalog that we use 
on production code.
   
   
   


-- 
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: issues-unsubscr...@iceberg.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to