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

             Summary: Puffin footer of Impala's deletion vectors doesn't follow 
the Puffin spec
                 Key: IMPALA-15797
                 URL: https://issues.apache.org/jira/browse/IMPALA-15797
             Project: IMPALA
          Issue Type: Bug
          Components: Backend
            Reporter: Zoltán Borók-Nagy


The Puffin spec says that the metadata of a {{deletion-vector-v1}} blob must 
omit {{compression-codec}}, because the blob is not compressed, must include 
the {{cardinality}} property, and must have -1 as {{snapshot-id}} and 
{{sequence-number}}. {{PuffinWriter}} writes {{"compression-codec":"none"}}, no 
{{cardinality}}, and 0 as {{snapshot-id}} and {{sequence-number}}. It also 
leaves {{fields}} empty, while Iceberg's {{BaseDVFileWriter}} writes the field 
id of the row position (2147483545) and sets {{created-by}}.

Scans are not affected, because they read the deletion vector at the 
{{content_offset}} and {{content_size_in_bytes}} of the manifest entry. But 
Iceberg's {{PuffinReader.readAll()}} fails on these files with 
"IllegalArgumentException: Unknown codec name: none", e.g. in 
{{RewriteTablePathUtil}}, which the rewrite_table_path procedure uses, and 
other readers that validate the footer may reject them.

{code:sql}
create table dv_t (i int) stored as iceberg tblproperties 
('format-version'='3');
insert into dv_t values (1), (2), (3);
delete from dv_t where i = 2;
{code}

Footer of the Puffin file:
{noformat}
{"blobs":[{"type":"deletion-vector-v1","fields":[],"snapshot-id":0,"sequence-number":0,
"offset":4,"length":42,"compression-codec":"none",
"properties":{"referenced-data-file":"hdfs://.../dv_t/data/...data.0.parq"}}],
"properties":{}}
{noformat}

Found while comparing the metadata written by master (19731aa580) with Iceberg 
1.11.0.



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

Reply via email to