deniskuzZ commented on code in PR #4748:
URL: https://github.com/apache/hive/pull/4748#discussion_r1361677121
##########
ql/src/java/org/apache/hadoop/hive/ql/parse/UpdateDeleteSemanticAnalyzer.java:
##########
@@ -285,6 +297,58 @@ private void reparseAndSuperAnalyze(ASTNode tree, Table
mTable, ASTNode tabNameN
}
}
+ private boolean tryMetadataUpdate(ASTNode tree, Table table, ASTNode
tabNameNode) throws SemanticException {
+ TableName tableName = getQualifiedTableName(tabNameNode);
+ if (!deleting() || table.getStorageHandler() == null) {
+ return false;
+ }
+ int whereIndex = 1;
+ List<? extends Node> children = tree.getChildren();
+ if (children.size() <= whereIndex) {
+ return false;
+ }
+ ASTNode whereNode = (ASTNode) children.get(whereIndex);
+ String whereClause = ctx.getTokenRewriteStream().toString(
+ whereNode.getChild(0).getTokenStartIndex(),
whereNode.getChild(0).getTokenStopIndex());
+ StringBuilder sb = new StringBuilder("insert into table
").append(getFullTableNameForSQL(tabNameNode))
Review Comment:
isn't it enough to have just select?
--
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]