Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.0.0
-
None
-
None
Description
ideally it should have with proper privileges specified
SQLUPDATE("UPDATE", null, null, true, false),
SQLDELETE("DELETE", null, null, true, false),
SQLMERGE("MERGE", null, null, true, false);
It would also be useful to have INSERT and SELECT
all of these are currently QUERY is not informative
see how VIEW related stuff in SemanticAnalyzerFactory to set more specific operation type
SELECT can be determined by
private boolean isReadOnly(ASTNode ast) { if(ast == null) { return false; } if(ast.getType() == HiveParser.TOK_QUERY) { return isReadOnly((ASTNode) ast.getFirstChildWithType(HiveParser.TOK_INSERT)); } if(ast.getType() == HiveParser.TOK_INSERT) { return isReadOnly((ASTNode)ast.getFirstChildWithType(HiveParser.TOK_DESTINATION)); } if(ast.getType() == HiveParser.TOK_DESTINATION) { return null != ast.getFirstChildWithType(HiveParser.TOK_DIR); } return false; }
Attachments
Issue Links
- is related to
-
HIVE-16447 QueryPlan.getOperation() is not always correct
- Open