rymurr commented on pull request #1783:
URL: https://github.com/apache/iceberg/pull/1783#issuecomment-741703853


   
   > I don't think that would work because some catalog name must be returned. 
We could only use a hive catalog if we've create one.
   
   Ah, yes. I was thinking of it from the `getTable` perspective. I see two 
options:
   
   1. as you suggested we register a catalog ourselves if none are registered
   2. we fail
   
   Option 2 is simple but obviously breaks backward compatibility. I don't know 
how people are using Spark3 and if catalogs are widely adopted so I don't know 
how bad of a break it is. Option 1 is as you say rather ugly but is backwards 
compatible.
   
   My understanding for Option 1 is the following:
   * check if the requested catalog (or current catalog) is able to handle 
Iceberg
   * if yes great, else create and register a `HiveCatalog` and replace the 
requested catalog w/ the created one
   
   This is rather woolly as I don't think we should change the catalog and I 
don't know how to reliably determine if a catalog supports Iceberg. A 
`CatalogPlugin` may be a delegating catalog or something that handles Iceberg 
tables but doesn't extend our `BaseCatalog`.
   
   I suppose option 3 is to proceed but warn that we can't guarantee the user 
is actually writing an Iceberg table. But who reads log messages ;-)
   
   I will post a straw man for option 1 to at least get something to discuss.
   


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

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