Zoltán Borók-Nagy created IMPALA-12136:
------------------------------------------

             Summary: Rewrite DELETE statements to TRUNCATE if possible
                 Key: IMPALA-12136
                 URL: https://issues.apache.org/jira/browse/IMPALA-12136
             Project: IMPALA
          Issue Type: Bug
            Reporter: Zoltán Borók-Nagy


If the user issues DELETE FROM t; to remove all rows from a table, we should 
rewrite it to TRUNCATE TABLE t; as it is much more efficient in some cases.

E.g., for Iceberg tables DELETE FROM t; would create delete files that contain 
all existing rows. Then subsequent readers would have to read all data files 
and delete files just to return an empty result set. Wherease TRUNCATE TABLE t; 
just creates a new empty table snapshot.

We'll need to investigate if it makes sense for Kudu tables as well.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to