dengzhhu653 commented on PR #6088:
URL: https://github.com/apache/hive/pull/6088#issuecomment-3489161909

   Sorry for the late reply.
   Took a quick overview of the changes, looks we introduce a new syntax for 
the catalog, as well as the future items: 
   >The code related to cat.db.tbl (part of the work in 
[HIVE-29177](https://issues.apache.org/jira/browse/HIVE-29177)) will also 
involve many table-related interfaces, which presents certain refactoring 
challenges.
   
   > let's further explore this issue when we work on cross-catalog queries. An 
already created ticket, 
[HIVE-29242](https://issues.apache.org/jira/browse/HIVE-29242), can be used to 
track this matter.
   
   It seems to me this is a significant/big change, and the user should follow 
a new way of catalog.db.table to request the table as the Trino/Presto does 
today.
   
   I think we can have a more simple idea, let's push the catalog awareness 
down into the Metastore client. For example, 
   SET CATALOG testcat;  -> change to a metaconf change, set 
metaconf:hive.metastore.current.catalog = testcat, default hive, this 
configuration will be propagated to HMS, every HMS API request will be appended 
with the `testcat`, both client and server can handle it.
   
   For cross-catalog queries, we can also do it in a similar way, we can 
introduce a new catalog awareness lawyer between session client and the thrift 
client, as SessionHiveMetaStoreClient -> CatalogAwarenessMetastoreClient -> 
ThriftHiveMetaStoreClient. The CatalogAwarenessMetastoreClient can acknowledge 
of the catalog through configuration or properties stored in HMS(HIVE-27186).  
Something as 
`hive.matastore.catalog.mapping.pattern`=`iceberg_catalog`:`ice_db1*,hive_db1,hive_db2.ice_tab*`;`hive`:`default,acid_db*`,
 the CatalogAwarenessMetastoreClient even can point to a third-party catalog 
partner.
   
   By this way, we don't need to introduce the change on the Hive SQL syntax 
and test it throughly, and other engines(such as Impala) can also benefit from 
this way to add the support on cross-catalog queries.


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