[ 
https://issues.apache.org/jira/browse/HIVE-16443?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman updated HIVE-16443:
----------------------------------
    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 
{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}

  was:
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


> 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
>            Assignee: Eugene Koifman
>
> 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
(v6.3.15#6346)

Reply via email to