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

   ### Apache Iceberg version
   
   main (development)
   
   ### Please describe the bug 🐞
   
   **Reproduction Steps**
   1. Load a catalog named `test_catalog`.
   2. Create a table named `test_namespace.test_table` table inside of it.
   3. Provide the following variations of this table's identifier to 
`catalog.load_table`, and ensure that the 3rd variation using 
`table.identifier` fails due to inclusion of the catalog's name 
(`test_catalog`) @ `table.identifier[0]`:
   ```python
   table = catalog.load_table("test_namespace.test_table")  # string identifier 
works...
   table = catalog.load_table(("test_namespace", "test_table"))  # tuple 
identifier also works...
   catalog.load_table(table.identifier)  # 
pyiceberg.exceptions.NoSuchTableError: NoSuchTableException: Table does not 
exist: test_catalog.test_namespace.test_table
   ```
   
   A more interesting question that I'd like to open for discussion as part of 
this issue is the best way to fix these issue. For example, we could argue that 
the bug lies with `catalog.load_table()` for not handling the catalog name as 
part of the identifier, or in table.identifier for including the catalog name 
as part of the identifier.
   
   As a workaround in my code for now, I've `catalog.load_table()` that scrubs 
any catalog names from the identifier before 
   
   
   **Environment Info**
   Iceberg REST Catalog running in the `tabulario/iceberg-rest` Docker 
container w/ a mock S3 Filesystem:
   
   ```python
   def catalog_properties() -> Dict[str, str]:
       return {
           "type": "rest",
           "uri": "http://localhost:8181";,
           "s3.endpoint": "http://localhost:9000";,
           "s3.access-key-id": "admin",
           "s3.secret-access-key": "password",
       }
       
   load_catalog(name="test_catalog", **catalog_properties())
   ```
   


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