zhangbutao commented on PR #6267:
URL: https://github.com/apache/hive/pull/6267#issuecomment-3797696523

   One thing to note: Currently, we have two entry points for creating 
catalogs—one is the SQL-based catalog creation entry involved in this PR, and 
the other is the HMS API-based catalog creation entry.  
   In this PR, I intend to enforce the inclusion of the `type` attribute when 
users create catalogs via SQL, so that users can clearly distinguish between 
different types of catalogs. However, the HMS API side does not enforce the 
`type` attribute when creating catalogs, which would lead to inconsistency 
between the two entry points.  
   
   Therefore, I have two approaches to resolve this issue and ensure 
consistency between the two entry points:  
   
   1) On the HMS server side, specifically in the `HMSHandler`, enforce a check 
during catalog creation to verify whether the user has provided the `type` 
attribute. If the `type` is missing, return an error. This approach would 
introduce backward compatibility issues for catalog creation.  
   
   2) Modify the current PR to make the `type` attribute optional for SQL-based 
catalog creation. For both SQL-based catalog creation and HMS API-based catalog 
creation, if the user does not provide the `type` attribute, assign a default 
value (e.g., `native`) on the HMSHandler server side. This approach would not 
cause compatibility issues with the catalog creation syntax. However, other 
open-source components enforce the `type` attribute requirement, and the `type` 
helps users better understand the parameter requirements for the catalog, among 
other benefits.  
   
   What are your suggestions regarding these two approaches? Thanks in advance.
   cc @deniskuzZ @difin 


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