zhangbutao commented on code in PR #6088:
URL: https://github.com/apache/hive/pull/6088#discussion_r2465632832


##########
ql/src/java/org/apache/hadoop/hive/ql/ddl/database/create/CreateDatabaseDesc.java:
##########
@@ -45,13 +46,14 @@ public class CreateDatabaseDesc implements DDLDesc, 
Serializable {
   private final String remoteDbName;
   private final Map<String, String> dbProperties;
 
-  public CreateDatabaseDesc(String databaseName, String comment, String 
locationUri, String managedLocationUri,
+  public CreateDatabaseDesc(String catalogName, String databaseName, String 
comment, String locationUri, String managedLocationUri,
       boolean ifNotExists, Map<String, String> dbProperties) {
-    this(databaseName, comment, locationUri, managedLocationUri, ifNotExists, 
dbProperties, "NATIVE", null, null);
+    this(catalogName, databaseName, comment, locationUri, managedLocationUri, 
ifNotExists, dbProperties, "NATIVE", null, null);

Review Comment:
   > for the external catalogs dbtype should be "REMOTE", right?
   
   I don't think so. `REMOTE ` dbtyp was introduced by HIVE-24396 data 
connector. If we implement all tasks about federated catalog, **we can 
deprecate data connector**. Because the data connector can only map external 
databases to internal databases by manually creating remote databases one by 
one to query external data sources,  like this:
   `CREATE REMOTE DATABASE db_map_mysql USING mysqlconnector with 
DBPROPERTIES("connector.remoteDbName"="testmysqldb");`
   
   whereas the federated catalog can retrieve all external databases at once 
without the need to manually create remote databases,  once we create a catalog.
   
   
   > It seems that we always hardcode "NATIVE" and below condition never 
returns true
   
   If you create a remote database with a specified dataconnector, this 
condition will return true.



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