[ 
https://issues.apache.org/jira/browse/HIVE-27031?focusedWorklogId=844342&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-844342
 ]

ASF GitHub Bot logged work on HIVE-27031:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 08/Feb/23 13:27
            Start Date: 08/Feb/23 13:27
    Worklog Time Spent: 10m 
      Work Description: 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)
   
   ```





Issue Time Tracking
-------------------

    Worklog Id:     (was: 844342)
    Time Spent: 40m  (was: 0.5h)

> Iceberg: Implement Copy-On-Write for Delete Queries
> ---------------------------------------------------
>
>                 Key: HIVE-27031
>                 URL: https://issues.apache.org/jira/browse/HIVE-27031
>             Project: Hive
>          Issue Type: Sub-task
>            Reporter: Ayush Saxena
>            Assignee: Ayush Saxena
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> Implement copy on write mode for deletes for iceberg tables



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to