Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-16443

HiveOperation doesn't have operations for Update, Delete, Merge

    XMLWordPrintableJSON

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

          Activity

            People

              Unassigned Unassigned
              ekoifman Eugene Koifman
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated: