You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by "ayushtkn (via GitHub)" <gi...@apache.org> on 2023/02/08 13:27:39 UTC

[GitHub] [hive] ayushtkn commented on a diff in pull request #4026: HIVE-27031: Iceberg: Implement Copy-On-Write for Delete Queries.

ayushtkn commented on code in PR #4026:
URL: https://github.com/apache/hive/pull/4026#discussion_r1100141606


##########
ql/src/java/org/apache/hadoop/hive/ql/parse/UpdateDeleteSemanticAnalyzer.java:
##########
@@ -162,8 +188,13 @@ private void reparseAndSuperAnalyze(ASTNode tree, Table mTable, ASTNode tabNameN
       rewrittenCtx.setOperation(Context.Operation.UPDATE);
       rewrittenCtx.addDestNamePrefix(1, Context.DestClausePrefix.UPDATE);
     } else if (deleting()) {
-      rewrittenCtx.setOperation(Context.Operation.DELETE);
-      rewrittenCtx.addDestNamePrefix(1, Context.DestClausePrefix.DELETE);
+      if (isOverwrite) {
+        rewrittenCtx.setOperation(Context.Operation.OTHER);

Review Comment:
   This guy throws me out:
   ```
      * {@link org.apache.hadoop.hive.ql.io.AcidUtils.Operation}.  See usages
      * of {@link #getDestNamePrefix(ASTNode, QB)} and
      * {@link org.apache.hadoop.hive.ql.parse.SemanticAnalyzer#updating(String)} and
      * {@link org.apache.hadoop.hive.ql.parse.SemanticAnalyzer#deleting(String)}.
      */
     public DestClausePrefix getDestNamePrefix(ASTNode curNode, QB queryBlock) {
   ```
   With:
   ```
    java.lang.IllegalStateException: Expected 'insert overwrite table default.ice01 select *  from default.ice01' to be in sub-query or set operation.
           at org.apache.hadoop.hive.ql.Context.getDestNamePrefix(Context.java:297)
   
   ```



-- 
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: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org