[ 
https://issues.apache.org/jira/browse/HIVE-28225?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17842596#comment-17842596
 ] 

Ayush Saxena commented on HIVE-28225:
-------------------------------------

We can explore a removal in the next release for sure, but we can't in 4.0.1, 
irrespective of default I believe the code shouldn't throw NPE, I will discuss 
with Sourabh tmrw on the removal.
Though I feel {{CopyOnWriteDeleteRewriter}} by code in its own should handle 
the case of empty where clause, rather than relying everyone will pass a where 
clause, if there is such an assumption & we plan to remove the check. in 4.1.0, 
maybe we can let that stay from code point of view or at worst can add a 
PreConditions check for where clause to avoid anything as such in future.

I need to explore if this config effect iceberg only or for ACID also or other 
storage handler? if even others as well, need to see if truncate everywhere is 
cheap or not


> Iceberg: Delete on entire table fails on COW mode
> -------------------------------------------------
>
>                 Key: HIVE-28225
>                 URL: https://issues.apache.org/jira/browse/HIVE-28225
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Ayush Saxena
>            Assignee: Ayush Saxena
>            Priority: Major
>              Labels: hive-4.0.1-must, pull-request-available
>             Fix For: 4.1.0
>
>
> If truncate is disabled, the delete on the entire table fails with NPE
> {noformat}
>  java.lang.NullPointerException
>         at 
> org.apache.hadoop.hive.ql.parse.rewrite.CopyOnWriteDeleteRewriter.rewrite(CopyOnWriteDeleteRewriter.java:47)
>         at 
> org.apache.hadoop.hive.ql.parse.rewrite.CopyOnWriteDeleteRewriter.rewrite(CopyOnWriteDeleteRewriter.java:31)
>         at 
> org.apache.hadoop.hive.ql.parse.RewriteSemanticAnalyzer.rewriteAndAnalyze(RewriteSemanticAnalyzer.java:93)
>         at 
> org.apache.hadoop.hive.ql.parse.DeleteSemanticAnalyzer.analyze(DeleteSemanticAnalyzer.java:78)
>         at 
> org.apache.hadoop.hive.ql.parse.RewriteSemanticAnalyzer.analyze(RewriteSemanticAnalyzer.java:84)
>         at 
> org.apache.hadoop.hive.ql.parse.RewriteSemanticAnalyzer.analyzeInternal(RewriteSemanticAnalyzer.java:72)
>         at 
> org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:327)
>         at org.apache.hadoop.hive.ql.Compiler.analyze(Compiler.java:224)
>         at org.apache.hadoop.hive.ql.Compiler.compile(Compiler.java:107)
>         at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:519)
>         at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:471)
>         at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:436)
>         at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:430)
>         at 
> org.apache.hadoop.hive.ql.reexec.ReExecDriver.compileAndRespond(ReExecDriver.java:121)
>         at 
> org.apache.hadoop.hive.ql.reexec.ReExecDriver.run(ReExecDriver.java:229){noformat}



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

Reply via email to