-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60589/#review179680
-----------------------------------------------------------




ql/src/test/queries/clientpositive/insert_overwrite_table.q
Lines 1-10 (patched)
<https://reviews.apache.org/r/60589/#comment254494>

    I don't understand this test case completely. The table is defined as 
external so it is expected that the drop partition will not delete the HDFS 
file. The DFS operation is performed without the knowledge of Hive so when it 
returned 2 rows instead of 1 isn't it the expected behavior?
    
    I think the right way to solve this problem to throw an exception when we 
do a insert overwrite on an external table. Just like truncate table command on 
an external table doesn't work, I think insert overwrite should also fail on a 
external table. The behavior of external table is inconsistent in my opinion. 
We allow it to be overwritten but not truncated.
    
    When the table is a managed table, the test works as expected since Hive 
cleans up the directory after drop partition command.


- Vihang Karajgaonkar


On July 3, 2017, 9:05 a.m., Barna Zsombor Klara wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60589/
> -----------------------------------------------------------
> 
> (Updated July 3, 2017, 9:05 a.m.)
> 
> 
> Review request for hive.
> 
> 
> Repository: hive-git
> 
> 
> Description
> -------
> 
> HIVE-17001: Insert overwrite table doesn't clean partition directory on HDFS 
> if partition is missing from HMS
> 
> 
> Diffs
> -----
> 
>   ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java 
> 73710a7c2917b5268f788f22baaee2d87846961b 
>   ql/src/test/queries/clientpositive/insert_overwrite_table.q PRE-CREATION 
>   ql/src/test/results/clientpositive/insert_overwrite_table.q.out 
> PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/60589/diff/1/
> 
> 
> Testing
> -------
> 
> Manual testing and qtests.
> 
> 
> Thanks,
> 
> Barna Zsombor Klara
> 
>

Reply via email to