Nándor Kollár created IMPALA-15791:
--------------------------------------
Summary: DELETE, UPDATE and MERGE write wrong partition values for
Iceberg BINARY partitions
Key: IMPALA-15791
URL: https://issues.apache.org/jira/browse/IMPALA-15791
Project: IMPALA
Issue Type: Bug
Reporter: Nándor Kollár
On Iceberg tables partitioned by identity or truncate on a BINARY column, the
delete files (position deletes and deletion vectors) that DELETE, UPDATE and
MERGE write get a wrong partition value: the base64 encoding of the value
instead of the value itself, e.g. 'YWJj' instead of 'abc'. Iceberg matches
delete files to data files by partition, so the deletes don't apply wherever it
does: in Impala for queries with a predicate on the partition column, and
probably for every query in other engines. Deleted rows come back, and UPDATE
leaves both the old and the new row. The statements succeed without any error.
Repro:
{code}
CREATE TABLE t (id INT, b BINARY) PARTITIONED BY SPEC (b) STORED AS ICEBERG
TBLPROPERTIES ('format-version'='3');
INSERT INTO t VALUES (1, CAST('abc' AS BINARY)), (2, CAST('abc' AS BINARY)),
(3, CAST('xyz' AS BINARY));
DELETE FROM t WHERE id = 1;
SELECT id FROM t WHERE b = CAST('abc' AS BINARY); -- expected 2,
actual 1 and 2
SELECT CAST(`partition`.b AS STRING) FROM t.delete_files; -- expected
'abc', actual 'YWJj'
{code}
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)