RussellSpitzer commented on issue #2833:
URL: https://github.com/apache/iceberg/issues/2833#issuecomment-882732111


   @pvary Spark looks for the first valid references to catalog or database 
before loading the table, we actually copied the logic here
   
   
https://github.com/apache/iceberg/blob/01393a06c284175edab75de34f48b2bfbd606081/spark/src/main/java/org/apache/iceberg/spark/SparkUtil.java#L80-L79
   
   But you end up checking 
   ```
   1. "Does the name have a single part?"
     a. "Load defaultCatalog - defaultDatabase - name"
   2. Can I treat the first part of the name as a catalog?
     a. Use the catalog, use the last element of the name as the table name, 
everything else is database
     b. "Load firstPart as Catalog, middlePart as Database, lastPart as 
TableName" - If database is empty, use default database
   3. Use the default Catalog
     a. Use last element as table name, everything else as database
     b. if database is empty use default database
   ```
   
   So say we have no table "history"
   
   "customer.history" refers to the metadata table
   
   If you have a database customer and table history and iceberg table customer
   
   "customer.customer.history" refers to the metadata table (customer.history 
is the other table)
   
   If you have a catalog customer and database customer and table history and 
table customer
   
   "customer.customer.customer.history" refers to the metadata table "history" 
   


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