[ 
https://issues.apache.org/jira/browse/IMPALA-15730?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Rozsa resolved IMPALA-15730.
----------------------------------
    Fix Version/s: Impala 5.0.0
       Resolution: Fixed

> ALTER TABLE DROP PARTITION can empty the whole table for Iceberg V2 tables
> --------------------------------------------------------------------------
>
>                 Key: IMPALA-15730
>                 URL: https://issues.apache.org/jira/browse/IMPALA-15730
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Frontend
>            Reporter: Nándor Kollár
>            Assignee: Nándor Kollár
>            Priority: Major
>              Labels: impala-iceberg
>             Fix For: Impala 5.0.0
>
>
> {{ALTER TABLE DROP PARTITION}} can empty the whole table for Iceberg V2 
> tables. A delete file shared by several data files is added once per data 
> file. If the list size happens to equal {{getTotalNumberOfFiles()}}, 
> {{isIcebergTruncate_}} is set, and the catalog runs 
> {{deleteFromRowFilter(alwaysTrue())}}, removing every partition.
> Steps to reproduce:
> {code}
> CREATE TABLE dp (id INT, p INT) PARTITIONED BY SPEC (p) STORED AS ICEBERG 
> TBLPROPERTIES('format-version'='2');
> INSERT INTO dp VALUES (1,1),(11,1);
> INSERT INTO dp VALUES (2,1),(12,1);
> INSERT INTO dp VALUES (3,2);
> DELETE FROM dp WHERE id IN (1,2);
> ALTER TABLE dp DROP PARTITION (p=1);
> SELECT count(*) FROM dp;   -- expected 1 (p=2), actual 0
> {code}
> This v3 tables with delete vectors are safe.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to