nrg4878 commented on a change in pull request #2037:
URL: https://github.com/apache/hive/pull/2037#discussion_r597391176
##########
File path: parser/src/java/org/apache/hadoop/hive/ql/parse/HiveParser.g
##########
@@ -1104,14 +1125,16 @@ orReplace
createDatabaseStatement
@init { pushMsg("create database statement", state); }
@after { popMsg(state); }
- : KW_CREATE (KW_DATABASE|KW_SCHEMA)
+ : KW_CREATE (remote=KW_REMOTE)? (KW_DATABASE|KW_SCHEMA)
ifNotExists?
name=identifier
databaseComment?
dbLocation?
dbManagedLocation?
+ dbConnectorName?
(KW_WITH KW_DBPROPERTIES dbprops=dbProperties)?
- -> ^(TOK_CREATEDATABASE $name ifNotExists? dbLocation? dbManagedLocation?
databaseComment? $dbprops?)
+ -> {$remote != null}? ^(TOK_CREATEDATABASE $name ifNotExists?
databaseComment? $dbprops? dbConnectorName?)
Review comment:
so connector encapsulates the properties related to the connection
(username/password, urls, connection pool sizes etc). But a single connector
can be used for various REMOTE databases. So anything specific to that database
will need to be in the DBPROPERTIES. A DB only uses the connector properties to
establish the connection, it does not automatically inherit any of them.
For a REMOTE database, both location and managedLocation are meaningless
because these point to the default location for where the table database is to
be stored. For such DBs, table data is hosted remotely.
--
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]