dengzhhu653 commented on code in PR #4304:
URL: https://github.com/apache/hive/pull/4304#discussion_r1212538925
##########
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/drop/DropTableAnalyzer.java:
##########
@@ -46,9 +48,13 @@ public DropTableAnalyzer(QueryState queryState) throws
SemanticException {
@Override
public void analyzeInternal(ASTNode root) throws SemanticException {
- String tableName = getUnescapedName((ASTNode) root.getChild(0));
+ TableName qualTabName = getQualifiedTableName((ASTNode) root.getChild(0));
+ String tableName = qualTabName.getTable();
boolean ifExists = (root.getFirstChildWithType(HiveParser.TOK_IFEXISTS) !=
null);
boolean throwException = !ifExists && !HiveConf.getBoolVar(conf,
ConfVars.DROP_IGNORES_NON_EXISTENT);
+ //Authorize database for drop table command
+ Database database = getDatabase(qualTabName.getDb());
+ outputs.add(new WriteEntity(database, WriteType.DDL_NO_LOCK));
Review Comment:
I find when we create table, the `WriteType` is `DDL_SHARED`, can we change
it to that?
--
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]