[
https://issues.apache.org/jira/browse/HIVE-16443?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Eugene Koifman reassigned HIVE-16443:
-------------------------------------
Assignee: (was: Eugene Koifman)
> HiveOperation doesn't have operations for Update, Delete, Merge
> ---------------------------------------------------------------
>
> Key: HIVE-16443
> URL: https://issues.apache.org/jira/browse/HIVE-16443
> Project: Hive
> Issue Type: Bug
> Components: Query Planning, Transactions
> Affects Versions: 1.0.0
> Reporter: Eugene Koifman
> Priority: Major
>
> 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
> {noformat}
> 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;
> }
> {noformat}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)