{"id":478318,"date":"2026-05-02T14:31:34","date_gmt":"2026-05-02T14:31:34","guid":{"rendered":"https:\/\/savepearlharbor.com\/?p=478318"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=478318","title":{"rendered":"Iceberg \u0431\u0435\u0437 Spark \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u043c\u0435\u043b\u043e\u0447\u0438: UPDATE, DELETE \u0438 MERGE INTO \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e SQL-\u0434\u0432\u0438\u0436\u043a\u0430 \u0432 Apache Doris 4.1"},"content":{"rendered":"<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<blockquote>\n<p><strong>\u0410\u0442\u0440\u0438\u0431\u0443\u0446\u0438\u044f:<\/strong> \u042d\u0442\u043e\u0442 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u043e\u043c \u0438 \u0430\u0434\u0430\u043f\u0442\u0430\u0446\u0438\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/morningman.github.io\/posts\/apache-doris-41-iceberg-v3-lakehouse\/\" rel=\"noopener noreferrer nofollow\">Apache Doris 4.1 on Iceberg V3: Running the Full Lakehouse Lifecycle from One SQL Engine<\/a> \u0437\u0430 \u0430\u0432\u0442\u043e\u0440\u0441\u0442\u0432\u043e\u043c Mingyu Chen (Rayner), \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u043f\u043e \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u0438 <a href=\"https:\/\/creativecommons.org\/licenses\/by\/4.0\/\" rel=\"noopener noreferrer nofollow\">CC BY 4.0<\/a>. \u0410\u0434\u0430\u043f\u0442\u0430\u0446\u0438\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430 \u0434\u043b\u044f \u0440\u0443\u0441\u0441\u043a\u043e\u044f\u0437\u044b\u0447\u043d\u043e\u0439 \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0438\u0438 \u0425\u0430\u0431\u0440\u0430 \u0441 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043e\u043c \u043f\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043d\u044b\u043c \u043a\u043e\u043c\u043f\u0440\u043e\u043c\u0438\u0441\u0441\u0430\u043c.<\/p>\n<\/blockquote>\n<hr\/>\n<p>\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043f\u0440\u043e Iceberg V3 \u0438 Apache Doris 4.1. \u041d\u043e \u043d\u0435 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u00ab\u0443 \u043d\u0430\u0441 \u0442\u0435\u043f\u0435\u0440\u044c \u0435\u0441\u0442\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u043d\u043e\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0444\u043e\u0440\u043c\u0430\u0442\u0430, \u0445\u043b\u043e\u043f\u0430\u0435\u043c \u0432 \u043b\u0430\u0434\u043e\u0448\u0438\u00bb. \u0413\u043e\u0440\u0430\u0437\u0434\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0435\u0435 \u0434\u0440\u0443\u0433\u043e\u0439 \u0432\u043e\u043f\u0440\u043e\u0441: \u0447\u0442\u043e \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f, \u043a\u043e\u0433\u0434\u0430 SQL-\u0434\u0432\u0438\u0436\u043e\u043a \u0443\u043c\u0435\u0435\u0442 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0438\u0442\u0430\u0442\u044c Iceberg-\u0442\u0430\u0431\u043b\u0438\u0446\u0443, \u043d\u043e \u0438 \u0434\u0435\u043b\u0430\u0442\u044c \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0435 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f, reconciliation, maintenance \u0438 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0443 \u0431\u0435\u0437 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e Spark-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0435 \u0442\u0435\u043b\u043e\u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435?<\/p>\n<p>\u0421\u043f\u043e\u0439\u043b\u0435\u0440: Spark \u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u043e\u0442\u043c\u0435\u043d\u044f\u043b. Flink \u0442\u043e\u0436\u0435. \u041d\u043e \u0435\u0441\u0442\u044c \u0446\u0435\u043b\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0435\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b, \u0433\u0434\u0435 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0434\u0432\u0438\u0436\u043a\u0430 \u0434\u043e\u0440\u043e\u0436\u0435 \u0441\u0430\u043c\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438.<\/p>\n<h4>\u0427\u0442\u043e \u0432\u044b \u0443\u0437\u043d\u0430\u0435\u0442\u0435 \u0438\u0437 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438<\/h4>\n<ul>\n<li>\n<p><strong>UPDATE \u043d\u0430 Iceberg \u0431\u0435\u0437 Spark job.<\/strong> Doris 4.1 \u0434\u0435\u043b\u0430\u0435\u0442 <code>UPDATE<\/code>, <code>DELETE<\/code>, <code>MERGE INTO<\/code> \u043d\u0430 Iceberg-\u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445 \u0438\u0437 \u0442\u043e\u0433\u043e \u0436\u0435 SQL-\u043a\u043b\u0438\u0435\u043d\u0442\u0430, \u0433\u0434\u0435 \u0432\u044b \u0443\u0436\u0435 \u043d\u0430\u0448\u043b\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443. \u0426\u0438\u043a\u043b \u00abquery \u2192 fix \u2192 verify\u00bb \u0441\u0436\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u0441 14 \u0447\u0430\u0441\u043e\u0432 \u0434\u043e \u043c\u0438\u043d\u0443\u0442.<\/p>\n<\/li>\n<li>\n<p><strong>Deletion Vectors \u0432\u043c\u0435\u0441\u0442\u043e Position Delete files.<\/strong> \u0412 Iceberg V3 DML \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043a\u043e\u043f\u0438\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 parquet delete files \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c commit. \u041e\u0434\u0438\u043d Puffin bitmap \u0432\u043c\u0435\u0441\u0442\u043e 320 \u0444\u0430\u0439\u043b\u043e\u0432. Query latency \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u0451\u0442 \u0434\u0435\u0433\u0440\u0430\u0434\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441 \u0440\u043e\u0441\u0442\u043e\u043c delete ratio (\u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a: 2\u20133x \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435).<\/p>\n<\/li>\n<li>\n<p><strong>Row Lineage \u043a\u0430\u043a CDC watermark.<\/strong> <code>_last_updated_sequence_number<\/code> \u0434\u0432\u0438\u0433\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c DML, \u0430 \u043d\u0435 \u043f\u0440\u0438 compaction. Downstream \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043f\u0435\u0440\u0435\u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0438 \u043f\u043e\u0441\u043b\u0435 <code>rewrite_data_files<\/code>. \u041e\u0434\u0438\u043d integer watermark \u0432\u043c\u0435\u0441\u0442\u043e snapshot diff.<\/p>\n<\/li>\n<li>\n<p><strong>Doris \u043d\u0435 \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u0442 Spark.<\/strong> Heavy ETL, backfills \u0438 streaming ingestion \u043e\u0441\u0442\u0430\u044e\u0442\u0441\u044f \u0437\u0430 Spark\/Flink. Doris \u0437\u0430\u0431\u0438\u0440\u0430\u0435\u0442 adjacent workflow: small DML, incremental reconciliation, maintenance \u0438 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0443.<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u0425\u043e\u0442\u0438\u0442\u0435 \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c?<\/strong> \u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u0435 \u0432 <a href=\"#%D1%87%D0%B0%D1%81%D1%82%D1%8C-8-quick-start\" rel=\"noopener noreferrer nofollow\">\u0427\u0430\u0441\u0442\u044c 8: Quick Start<\/a> \u0442\u0430\u043c \u043f\u0443\u0442\u044c \u043e\u0442 \u043d\u0443\u043b\u044f \u0434\u043e V3-\u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0437\u0430 \u043f\u044f\u0442\u044c \u043c\u0438\u043d\u0443\u0442.<\/p>\n<hr\/>\n<h3>\u0427\u0430\u0441\u0442\u044c 1: 3 \u0447\u0430\u0441\u0430 \u043d\u043e\u0447\u0438, \u043e\u0434\u043d\u0430 \u0441\u0442\u0440\u043e\u043a\u0430 \u0441\u043b\u043e\u043c\u0430\u043d\u0430<\/h3>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0443\u044e \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e.<\/p>\n<p>Data engineer \u0432 e-commerce \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0441\u0438\u0434\u0438\u0442 \u0432 Doris \u0438 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u0442 Iceberg-\u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0441 \u0437\u0430\u043a\u0430\u0437\u0430\u043c\u0438. \u0412\u0438\u0434\u0438\u0442, \u0447\u0442\u043e \u0432\u0447\u0435\u0440\u0430\u0448\u043d\u0438\u0439 batch \u0438\u0437 ERP \u043f\u0440\u043e\u0441\u0442\u0430\u0432\u0438\u043b <code>status = 'cancelled'<\/code> \u0434\u043b\u044f 200 \u0437\u0430\u043a\u0430\u0437\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0431\u044b\u043b\u0438 \u043e\u043f\u043b\u0430\u0447\u0435\u043d\u044b \u2014 upstream-\u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043a\u0440\u0438\u0432\u043e\u0439 snapshot. \u0417\u0430\u043f\u0440\u043e\u0441 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442: \u0432\u043e\u0442 \u043e\u043d\u0438, 200 \u0441\u0442\u0440\u043e\u043a \u0441 \u043d\u0435\u0432\u0435\u0440\u043d\u044b\u043c \u0441\u0442\u0430\u0442\u0443\u0441\u043e\u043c. \u0418\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 &#8212; \u0431\u0430\u043d\u0430\u043b\u044c\u043d\u044b\u0439 <code>WHERE order_id IN (...)<\/code> \u0438 <code>SET status = 'paid'<\/code>.<\/p>\n<p>\u0412 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u043c\u0438\u0440\u0435 \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"sql\">UPDATE orders_icebergSET status = 'paid'WHERE order_id IN (SELECT order_id FROM bad_batch_ids);<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:87px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0427\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0434\u0430\u043b\u044c\u0448\u0435 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u043c\u0438\u0440\u0435 \u2014 \u043a\u0440\u0430\u0441\u0438\u0432\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0432 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 Mingyu Chen. \u0418\u043d\u0436\u0435\u043d\u0435\u0440 \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u0435\u0442 SQL-\u043a\u043b\u0438\u0435\u043d\u0442 \u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0434\u0440\u0443\u0433\u043e\u0439 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441:<\/p>\n<ol>\n<li>\n<p>\u041f\u0438\u0448\u0435\u0442 Spark job.<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0434\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442 scheduler.<\/p>\n<\/li>\n<li>\n<p>\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442 PR.<\/p>\n<\/li>\n<li>\n<p>\u0416\u0434\u0451\u0442 review.<\/p>\n<\/li>\n<li>\n<p>\u0427\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u2014 \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442 \u0437\u0430\u0434\u0430\u0447\u0443 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u0435, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0443 \u043d\u0435\u0433\u043e \u043d\u0435\u0442 \u043f\u0440\u044f\u043c\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a write-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0443.<\/p>\n<\/li>\n<li>\n<p>\u0423\u0442\u0440\u043e\u043c \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432 Doris \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442, \u0447\u0442\u043e \u0432\u0441\u0451 \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e.<\/p>\n<\/li>\n<\/ol>\n<p>\u041f\u043e\u043b\u043d\u044b\u0439 \u0446\u0438\u043a\u043b \u2014 14 \u0447\u0430\u0441\u043e\u0432. \u041a\u043e\u0434 \u043f\u043e \u0441\u043c\u044b\u0441\u043b\u0443 \u2014 \u043e\u0434\u0438\u043d <code>UPDATE<\/code>.<\/p>\n<p>\u0415\u0441\u0442\u044c \u0438 \u043c\u0435\u043d\u0435\u0435 \u0434\u0440\u0430\u043c\u0430\u0442\u0438\u0447\u043d\u044b\u0439, \u043d\u043e \u0431\u043e\u043b\u0435\u0435 \u0447\u0430\u0441\u0442\u044b\u0439 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439. CDC-\u043f\u043e\u0442\u043e\u043a \u043f\u0438\u0448\u0435\u0442 \u0432 Iceberg, small files \u0438 delete files \u043a\u043e\u043f\u044f\u0442\u0441\u044f, \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u0434\u0435\u0433\u0440\u0430\u0434\u0438\u0440\u0443\u044e\u0442. \u0412\u0441\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u044e\u0442, \u0447\u0442\u043e \u043d\u0443\u0436\u0435\u043d <code>rewrite_data_files<\/code>.<\/p>\n<p>\u0412 \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u0445 \u0441 self-service \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439 \u0438\u043d\u0436\u0435\u043d\u0435\u0440 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442 compaction \u0441\u0430\u043c. \u041d\u043e \u0432\u043e \u043c\u043d\u043e\u0433\u0438\u0445 \u0441\u0440\u0435\u0434\u043d\u0438\u0445 \u0438 \u043a\u0440\u0443\u043f\u043d\u044b\u0445 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u044f\u0445 write-\u0434\u043e\u0441\u0442\u0443\u043f \u043a Iceberg-\u0442\u0430\u0431\u043b\u0438\u0446\u0430\u043c \u0436\u0438\u0432\u0451\u0442 \u0443 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 platform team \u2014 \u0438 \u0442\u043e\u0433\u0434\u0430 \u0437\u0430\u0434\u0430\u0447\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e \u0441\u0443\u0442\u0438 \u043e\u0434\u0438\u043d SQL-\u0432\u044b\u0437\u043e\u0432, \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432 ticket, maintenance window \u0438 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0435. \u0418\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e\u0442 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043f\u0430\u0442\u0442\u0435\u0440\u043d \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0430\u0432\u0442\u043e\u0440 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438, \u0438 \u043e\u043d \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442\u0441\u044f \u0447\u0430\u0449\u0435, \u0447\u0435\u043c \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b.<\/p>\n<p>Iceberg \u0440\u0435\u0448\u0438\u043b \u043e\u0433\u0440\u043e\u043c\u043d\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b: \u043e\u043d \u0441\u0434\u0435\u043b\u0430\u043b \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c transactional-\u0444\u043e\u0440\u043c\u0430\u0442\u043e\u043c \u043f\u043e\u0432\u0435\u0440\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0432 object storage. \u041d\u043e \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u044d\u0442\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435\u0439 \u0447\u0430\u0441\u0442\u043e \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u043d\u0435 \u0442\u0430\u043a\u043e\u0439 \u0443\u0436 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u0439:<\/p>\n<ul>\n<li>\n<p>\u0447\u0438\u0442\u0430\u0435\u043c \u0432 \u043e\u0434\u043d\u043e\u043c \u0434\u0432\u0438\u0436\u043a\u0435;<\/p>\n<\/li>\n<li>\n<p>\u043f\u0438\u0448\u0435\u043c \u0432 \u0434\u0440\u0443\u0433\u043e\u043c;<\/p>\n<\/li>\n<li>\n<p>compaction \u0438 maintenance \u0434\u0435\u043b\u0430\u0435\u043c \u0447\u0435\u0440\u0435\u0437 \u0442\u0440\u0435\u0442\u0438\u0439;<\/p>\n<\/li>\n<li>\n<p>CDC \u0438 streaming ingestion \u0436\u0438\u0432\u0443\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0434\u0432\u0430 \u043d\u0430\u043b\u043e\u0433\u0430 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0435 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435: <strong>switch-engine tax<\/strong> \u0438 <strong>cross-team tax<\/strong>. Apache Doris 4.1 \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u043e\u0431\u0430.<\/p>\n<hr\/>\n<h3>\u0427\u0430\u0441\u0442\u044c 2: \u0413\u0434\u0435 Doris \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 Iceberg-\u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u0435<\/h3>\n<p>\u0412\u0430\u0436\u043d\u043e \u0441\u0440\u0430\u0437\u0443 \u0441\u043d\u044f\u0442\u044c \u043b\u0438\u0448\u043d\u0435\u0435 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0435: Doris \u043d\u0435 \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c Spark \u0432\u043e \u0432\u0441\u0435\u0445 \u0437\u0430\u0434\u0430\u0447\u0430\u0445.<\/p>\n<p>Apache Doris \u2014 \u044d\u0442\u043e MPP SQL engine, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0447\u0438\u043d\u0430\u043b \u043a\u0430\u043a data warehouse, \u0430 \u0437\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0434\u0432\u0430 \u043c\u0430\u0436\u043e\u0440\u043d\u044b\u0445 \u0440\u0435\u043b\u0438\u0437\u0430 \u0441\u043c\u0435\u0441\u0442\u0438\u043b \u0446\u0435\u043d\u0442\u0440 \u0442\u044f\u0436\u0435\u0441\u0442\u0438 \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 lakehouse workloads. Spark \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u0434\u043b\u044f cross-source backfills, \u0442\u044f\u0436\u0451\u043b\u043e\u0433\u043e ETL, \u0431\u043e\u043b\u044c\u0448\u0438\u0445 batch-job\u2019\u043e\u0432 \u0438 \u0448\u0438\u0440\u043e\u043a\u043e\u0439 batch\/streaming-\u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u044b. Flink \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u0432\u044b\u0431\u043e\u0440\u043e\u043c \u0434\u043b\u044f streaming ingestion \u0438 continuous CDC write paths.<\/p>\n<p>\u0420\u043e\u043b\u044c Doris \u0432 \u044d\u0442\u043e\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u0443\u0437\u043a\u0430\u044f \u0438 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0430\u044f: <strong>real-time query layer \u0434\u043b\u044f Iceberg<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u0437\u0430\u0431\u0438\u0440\u0430\u0435\u0442 \u0441\u043e\u0441\u0435\u0434\u043d\u0438\u0439 workflow:<\/p>\n<ul>\n<li>\n<p>\u0432\u044b \u0443\u0436\u0435 \u043f\u0440\u0438\u0448\u043b\u0438 \u0432 SQL-\u043a\u043b\u0438\u0435\u043d\u0442 \u0441 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c;<\/p>\n<\/li>\n<li>\n<p>\u0443\u0432\u0438\u0434\u0435\u043b\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0438\u043b\u0438 \u0440\u0430\u0441\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435;<\/p>\n<\/li>\n<li>\n<p>\u0445\u043e\u0442\u0438\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435;<\/p>\n<\/li>\n<li>\n<p>\u0445\u043e\u0442\u0438\u0442\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c incremental reconciliation;<\/p>\n<\/li>\n<li>\n<p>\u0445\u043e\u0442\u0438\u0442\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c maintenance \u0438\u043b\u0438 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0443;<\/p>\n<\/li>\n<li>\n<p>\u043d\u0435 \u0445\u043e\u0442\u0438\u0442\u0435 \u0440\u0430\u0434\u0438 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u044b\u0433\u0430\u0442\u044c \u0432 \u0434\u0440\u0443\u0433\u043e\u0439 \u043a\u043b\u0430\u0441\u0442\u0435\u0440.<\/p>\n<\/li>\n<\/ul>\n<p>\u0412 Doris 4.1 \u043c\u0430\u0442\u0440\u0438\u0446\u0430 Iceberg-\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0448\u0438\u0440\u043e\u043a\u043e:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p align=\"left\">\u0417\u043e\u043d\u0430<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u0427\u0442\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">Read<\/p>\n<\/td>\n<td>\n<p align=\"left\">V1\/V2\/V3, time travel, branch\/tag, views, system tables, Position\/Equality\/DV delete<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">Write<\/p>\n<\/td>\n<td>\n<p align=\"left\"><code>INSERT<\/code>, <code>OVERWRITE<\/code>, <code>CTAS<\/code>, <code>INSERT INTO BRANCH<\/code>, <code>DELETE<\/code>, <code>UPDATE<\/code>, <code>MERGE INTO<\/code><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">DDL<\/p>\n<\/td>\n<td>\n<p align=\"left\">create\/drop table, schema change, partition evolution, branch\/tag management<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">Maintain<\/p>\n<\/td>\n<td>\n<p align=\"left\"><code>rewrite_data_files<\/code>, <code>expire_snapshots<\/code>, <code>rewrite_manifests<\/code>, rollback, fast_forward<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">Diagnose<\/p>\n<\/td>\n<td>\n<p align=\"left\">data file distribution, dangling delete<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/\/post_images\/74a\/876\/b70\/74a876b706f6659d5532be31642fc690.png\" alt=\"Apache Doris 4.1 &amp; Iceberg V3 Lakehouse Lifecycle\" sizes=\"(max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/\/post_images\/74a\/876\/b70\/74a876b706f6659d5532be31642fc690.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/\/post_images\/74a\/876\/b70\/74a876b706f6659d5532be31642fc690.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>Apache Doris 4.1 &amp; Iceberg V3 Lakehouse Lifecycle<\/figcaption><\/div>\n<\/figure>\n<p><em>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430: \u043e\u0434\u0438\u043d SQL-\u0434\u0432\u0438\u0436\u043e\u043a \u0434\u043b\u044f Read, Write, DDL, Maintenance \u0438 Diagnostics \u043d\u0430 Iceberg V3 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445. \u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a: \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f Mingyu Chen.<\/em> <\/p>\n<p>\u041d\u043e \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043d\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u043d\u0435 \u0432\u0441\u044f \u043c\u0430\u0442\u0440\u0438\u0446\u0430. \u0424\u043e\u043a\u0443\u0441 \u043d\u0430 \u0434\u0432\u0443\u0445 \u0432\u0435\u0449\u0430\u0445:<\/p>\n<ol>\n<li>\n<p><strong>DML completeness<\/strong>: <code>UPDATE<\/code>, <code>DELETE<\/code>, <code>MERGE INTO<\/code> \u043f\u0440\u044f\u043c\u043e \u0438\u0437 SQL-\u043a\u043b\u0438\u0435\u043d\u0442\u0430.<\/p>\n<\/li>\n<li>\n<p><strong>Iceberg V3 mechanics<\/strong>: Deletion Vectors \u0438 Row Lineage, \u0431\u0435\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 DML \u0431\u044b\u0441\u0442\u0440\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u043a\u043e\u043f\u0438\u0442\u044c \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0434\u043e\u043b\u0433.<\/p>\n<\/li>\n<\/ol>\n<hr\/>\n<h3>\u0427\u0430\u0441\u0442\u044c 3: DML \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432 query layer<\/h3>\n<p>\u041d\u0430\u0447\u043d\u0451\u043c \u0441 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e.<\/p>\n<p>\u0418\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043e\u0434\u043d\u0443 \u0441\u0442\u0440\u043e\u043a\u0443:<\/p>\n<pre><code class=\"sql\">UPDATE iceberg_tblSET name = 'Alice-fixed'WHERE id = 1;<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041e\u0442\u043a\u0430\u0442\u0438\u0442\u044c \u043f\u043b\u043e\u0445\u043e\u0439 batch:<\/p>\n<pre><code class=\"sql\">DELETE FROM iceberg_tblWHERE dt = '2026-04-01'  AND source = 'bad_pipeline';<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0421\u0434\u0435\u043b\u0430\u0442\u044c upsert \u043f\u043e incremental batch:<\/p>\n<pre><code class=\"sql\">MERGE INTO iceberg_tbl tUSING (    SELECT 1 AS id, 'Alice_new' AS name, 26 AS age, 'U' AS flag    UNION ALL SELECT 2, 'Bob',  30, 'D'    UNION ALL SELECT 4, 'Dora', 28, 'I') sON t.id = s.idWHEN MATCHED AND s.flag = 'D' THEN DELETEWHEN MATCHED THEN UPDATE SET name = s.name, age = s.ageWHEN NOT MATCHED THEN INSERT (id, name, age) VALUES (s.id, s.name, s.age);<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p><code>MERGE INTO<\/code> \u0437\u0434\u0435\u0441\u044c \u0441\u0430\u043c\u0430\u044f \u0432\u0430\u0436\u043d\u0430\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f. \u0418\u043c\u0435\u043d\u043d\u043e \u043d\u0430 \u043d\u0435\u0439 \u0434\u0435\u0440\u0436\u0430\u0442\u0441\u044f \u0442\u0438\u043f\u0438\u0447\u043d\u044b\u0435 CDC\/upsert-\u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438:<\/p>\n<ul>\n<li>\n<p>\u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0438\u0437 PostgreSQL \u0438\u043b\u0438 MySQL \u043f\u0440\u0438\u043b\u0435\u0442\u0430\u044e\u0442 \u0447\u0435\u0440\u0435\u0437 Flink CDC \u0438\u043b\u0438 \u043f\u043e\u0445\u043e\u0436\u0438\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442;<\/p>\n<\/li>\n<li>\n<p>downstream Iceberg-\u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u043f\u0440\u0438\u043d\u044f\u0442\u044c inserts, updates \u0438 deletes \u0432\u043c\u0435\u0441\u0442\u0435;<\/p>\n<\/li>\n<li>\n<p>incremental materialized views \u0434\u043e\u043b\u0436\u043d\u044b \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c wide tables \u043f\u043e change key.<\/p>\n<\/li>\n<\/ul>\n<p>\u0411\u0435\u0437 <code>MERGE INTO<\/code> \u0432\u044b \u043b\u0438\u0431\u043e \u043f\u0435\u0440\u0435\u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0446\u0435\u043b\u0438\u043a\u043e\u043c, \u043b\u0438\u0431\u043e \u0443\u043d\u043e\u0441\u0438\u0442\u0435 \u043b\u043e\u0433\u0438\u043a\u0443 \u0432 Spark\/Flink \u0438 \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u0435\u0442\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 pipeline.<\/p>\n<p>\u0412 Doris 4.1 <code>MERGE INTO<\/code> \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 partitioned targets, subqueries \u043a\u0430\u043a source \u0438 expressions \u0432 <code>UPDATE<\/code>-\u0447\u0430\u0441\u0442\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <code>age = age * 2 + 1<\/code>.<\/p>\n<p>\u041d\u043e caveat \u0441\u0440\u0430\u0437\u0443: target table \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c <code>format-version &gt;= 2<\/code>, \u0430 \u0441\u0430\u043c <code>MERGE INTO<\/code> \u0432 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u043e\u043c\u0435\u0447\u0435\u043d \u043a\u0430\u043a experimental. \u042d\u0442\u043e \u043d\u0435 \u00ab\u0441\u0440\u0430\u0437\u0443 \u043a\u0430\u0442\u0438\u043c \u0432 \u043f\u0440\u043e\u0434 \u0432 \u043f\u044f\u0442\u043d\u0438\u0446\u0443 \u0432\u0435\u0447\u0435\u0440\u043e\u043c\u00bb, \u0430 \u00ab\u0434\u0435\u043b\u0430\u0435\u043c POC \u043d\u0430 \u0441\u0432\u043e\u0451\u043c workload\u00bb.<\/p>\n<hr\/>\n<h3>\u0427\u0430\u0441\u0442\u044c 4: \u041f\u043e\u0447\u0435\u043c\u0443 DML \u0431\u0435\u0437 V3 \u0431\u044b\u0441\u0442\u0440\u043e \u043a\u043e\u043f\u0438\u0442 \u0434\u043e\u043b\u0433\u0438<\/h3>\n<p>\u041c\u043e\u0436\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0440\u0430\u0437 Doris \u0442\u0435\u043f\u0435\u0440\u044c \u0443\u043c\u0435\u0435\u0442 <code>UPDATE<\/code>, <code>DELETE<\/code>, <code>MERGE INTO<\/code> \u043d\u0430 Iceberg \u2014 \u0437\u0430\u0434\u0430\u0447\u0430 \u0440\u0435\u0448\u0435\u043d\u0430.<\/p>\n<p>\u041d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c. \u041d\u0430\u043b\u0438\u0447\u0438\u0435 DML \u2014 \u044d\u0442\u043e \u0435\u0449\u0451 \u043d\u0435 \u0445\u043e\u0440\u043e\u0448\u0438\u0439 DML.<\/p>\n<p>\u0412 Iceberg V2 \u043a\u0430\u0436\u0434\u0430\u044f \u0442\u0430\u043a\u0430\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u0441\u043e\u0437\u0434\u0430\u0451\u0442 <strong>Position Delete file<\/strong>. \u042d\u0442\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 parquet-\u0444\u0430\u0439\u043b, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u043e: \u00ab\u0432\u043e\u0442 \u044d\u0442\u0438 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u0438\u0437 data file \u043d\u0443\u0436\u043d\u043e \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0443\u0434\u0430\u043b\u0451\u043d\u043d\u044b\u043c\u0438\u00bb. \u0427\u0442\u043e\u0431\u044b \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, reader \u0432\u044b\u043d\u0443\u0436\u0434\u0435\u043d \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c anti-join: \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c data files, \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432\u0441\u0435 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 delete files, \u043e\u0442\u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043c\u0435\u0447\u0435\u043d\u043d\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438.<\/p>\n<p>\u041e\u0434\u0438\u043d delete file \u2014 \u043d\u0438\u0447\u0435\u0433\u043e \u0441\u0442\u0440\u0430\u0448\u043d\u043e\u0433\u043e. \u0414\u0435\u0441\u044f\u0442\u044c \u2014 \u0442\u0435\u0440\u043f\u0438\u043c\u043e. \u0421\u043e\u0442\u043d\u0438 \u0438 \u0442\u044b\u0441\u044f\u0447\u0438 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0445 DML commits \u0432 CDC-\u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u2014 \u0443\u0436\u0435 \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u043e.<\/p>\n<p>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0440\u0430\u0441\u0442\u0451\u0442 \u043b\u0438\u043d\u0435\u0439\u043d\u043e:<\/p>\n<ul>\n<li>\n<p>\u043a\u0430\u0436\u0434\u044b\u0439 DML commit \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u043e\u0432\u044b\u0435 delete files;<\/p>\n<\/li>\n<li>\n<p>\u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 query \u0432\u044b\u043d\u0443\u0436\u0434\u0435\u043d \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0442\u044c \u0438 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0442\u044c \u0432\u0441\u0435 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u044b\u0435 delete files;<\/p>\n<\/li>\n<li>\n<p>\u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0443\u0436\u0435\u043d <code>rewrite_data_files<\/code>, \u0447\u0442\u043e\u0431\u044b \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0432 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435;<\/p>\n<\/li>\n<li>\n<p>\u0430 \u0437\u043d\u0430\u0447\u0438\u0442, \u0441\u043d\u043e\u0432\u0430 maintenance job, scheduler \u0438 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u2014 \u0442\u043e\u0442 \u0441\u0430\u043c\u044b\u0439 Jira-ticket \u0438\u0437 \u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u0442\u0430\u0442\u044c\u0438.<\/p>\n<\/li>\n<\/ul>\n<p>\u042d\u0442\u043e \u043f\u0435\u0440\u0432\u044b\u0439 \u0434\u043e\u043b\u0433: <strong>performance debt<\/strong>. DML \u0432\u0440\u043e\u0434\u0435 \u0435\u0441\u0442\u044c, \u043d\u043e \u043a\u0430\u0436\u0434\u044b\u0439 commit \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e \u0443\u0445\u0443\u0434\u0448\u0430\u0435\u0442 \u0447\u0442\u0435\u043d\u0438\u0435.<\/p>\n<p>\u0415\u0441\u0442\u044c \u0432\u0442\u043e\u0440\u043e\u0439 \u0434\u043e\u043b\u0433: <strong>observability debt<\/strong>. \u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a commit \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u0451\u043b, downstream-\u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u0437\u043d\u0430\u044e\u0442, \u043a\u043e\u0433\u0434\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u0431\u044b\u043b\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0440\u0430\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0430. \u041e\u043d\u0438 \u043f\u043e\u043b\u0430\u0433\u0430\u044e\u0442\u0441\u044f \u043d\u0430 snapshot diff. \u041d\u043e compaction \u0438 <code>rewrite_data_files<\/code> \u0442\u043e\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u044e\u0442 \u043d\u043e\u0432\u044b\u0435 snapshots, \u0445\u043e\u0442\u044f \u0434\u0430\u043d\u043d\u044b\u0435 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435 \u043c\u0435\u043d\u044f\u043b\u0438\u0441\u044c.<\/p>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 downstream pipeline \u0432\u0438\u0434\u0438\u0442 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0439 rewrite \u0438 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u0443\u0435\u0442 \u0435\u0433\u043e \u043a\u0430\u043a \u043d\u043e\u0432\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u2014 \u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u043f\u0435\u0440\u0435\u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u0442\u0440\u043e\u0433\u0430\u043b.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u043a\u043e\u0440\u043e\u0442\u043a\u043e:<\/p>\n<blockquote>\n<p>DML \u0431\u0435\u0437 V3 \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432 \u0434\u0432\u0430 \u0434\u043e\u043b\u0433\u0430: performance debt \u0438 observability debt.<\/p>\n<\/blockquote>\n<p>Iceberg V3 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u043d\u0430 \u043d\u0438\u0445 \u0434\u0432\u0443\u043c\u044f \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430\u043c\u0438:<\/p>\n<ul>\n<li>\n<p><strong>Deletion Vectors<\/strong> \u2014 \u0447\u0442\u043e\u0431\u044b DML \u043d\u0435 \u0440\u0430\u0437\u0434\u0443\u0432\u0430\u043b delete files.<\/p>\n<\/li>\n<li>\n<p><strong>Row Lineage<\/strong> \u2014 \u0447\u0442\u043e\u0431\u044b row-level changes \u0431\u044b\u043b\u0438 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c\u044b\u043c\u0438.<\/p>\n<\/li>\n<\/ul>\n<hr\/>\n<h3>\u0427\u0430\u0441\u0442\u044c 5: Deletion Vectors \u2014 \u043c\u0435\u043d\u044c\u0448\u0435 delete files, \u043c\u0435\u043d\u044c\u0448\u0435 anti-join<\/h3>\n<p>Deletion Vector \u2014 \u044d\u0442\u043e bitmap, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0445\u0440\u0430\u043d\u0438\u0442, \u043a\u0430\u043a\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 data file \u0441\u0447\u0438\u0442\u0430\u044e\u0442\u0441\u044f \u0443\u0434\u0430\u043b\u0451\u043d\u043d\u044b\u043c\u0438. \u0412 Iceberg V3 \u043e\u043d \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 <a href=\"https:\/\/iceberg.apache.org\/puffin-spec\/\" rel=\"noopener noreferrer nofollow\">Puffin<\/a> file format.<\/p>\n<p>\u041a\u043e\u043d\u0442\u0440\u0430\u0441\u0442 \u0441 V2 \u0442\u0430\u043a\u043e\u0439:<\/p>\n<ul>\n<li>\n<p><strong>V2:<\/strong> \u043a\u0430\u0436\u0434\u044b\u0439 DML commit \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 Position Delete parquet.<\/p>\n<\/li>\n<li>\n<p><strong>V3:<\/strong> \u0432\u0441\u0435 \u043f\u043e\u043c\u0435\u0442\u043a\u0438 \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e data file \u0441\u0445\u043b\u043e\u043f\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u043e\u0434\u0438\u043d Puffin Deletion Vector.<\/p>\n<\/li>\n<li>\n<p><strong>V2 reader:<\/strong> \u0447\u0438\u0442\u0430\u0435\u0442 data file, \u043f\u043e\u0442\u043e\u043c anti-join \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u043c\u0438 delete files.<\/p>\n<\/li>\n<li>\n<p><strong>V3 reader:<\/strong> \u0447\u0438\u0442\u0430\u0435\u0442 data file + DV \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442 bitmap \u0437\u0430 \u043e\u0434\u0438\u043d \u043f\u0440\u043e\u0445\u043e\u0434. Anti-join \u0438\u0441\u0447\u0435\u0437\u0430\u0435\u0442.<\/p>\n<\/li>\n<\/ul>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/\/post_images\/72d\/595\/098\/72d595098fbd82c3dab52360cf545662.png\" alt=\"Iceberg V2 Position Deletes vs V3 Deletion Vector\" sizes=\"(max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/\/post_images\/72d\/595\/098\/72d595098fbd82c3dab52360cf545662.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/\/post_images\/72d\/595\/098\/72d595098fbd82c3dab52360cf545662.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>Iceberg V2 Position Deletes vs V3 Deletion Vector<\/figcaption><\/div>\n<\/figure>\n<p><em>V2 \u043a\u043e\u043f\u0438\u0442 Position Delete parquet-\u0444\u0430\u0439\u043b\u044b \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c DML commit. V3 \u0441\u0445\u043b\u043e\u043f\u044b\u0432\u0430\u0435\u0442 \u0432\u0441\u0435 \u043f\u043e\u043c\u0435\u0442\u043a\u0438 \u0432 \u043e\u0434\u0438\u043d Puffin Deletion Vector. \u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a: \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f Mingyu Chen.<\/em> <\/p>\n<p>\u041c\u0438\u043d\u0438-\u043f\u0440\u0438\u043c\u0435\u0440 V2:<\/p>\n<pre><code class=\"sql\">CREATE TABLE orders_v2 (    id INT,    status STRING,    amount DECIMAL(10,2)) PROPERTIES ('format-version' = '2');INSERT INTO orders_v2 VALUES    (1, 'pending', 100),    (2, 'pending', 200),    (3, 'pending', 300);UPDATE orders_v2 SET status = 'shipped' WHERE id = 1;UPDATE orders_v2 SET status = 'shipped' WHERE id = 2;DELETE FROM orders_v2 WHERE id = 3;<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u0440\u0451\u0445 DML commits \u0432 V2 \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0442\u0440\u0438 Position Delete files.<\/p>\n<p>\u0422\u0430 \u0436\u0435 \u043b\u043e\u0433\u0438\u043a\u0430 \u043d\u0430 V3:<\/p>\n<pre><code class=\"sql\">CREATE TABLE orders_v3 (    id INT,    status STRING,    amount DECIMAL(10,2)) PROPERTIES ('format-version' = '3');INSERT INTO orders_v3 VALUES    (1, 'pending', 100),    (2, 'pending', 200),    (3, 'pending', 300);UPDATE orders_v3 SET status = 'shipped' WHERE id = 1;UPDATE orders_v3 SET status = 'shipped' WHERE id = 2;DELETE FROM orders_v3 WHERE id = 3;<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u043c\u0435\u0441\u0442\u043e \u043d\u0430\u0431\u043e\u0440\u0430 parquet delete files \u0440\u044f\u0434\u043e\u043c \u0441 data file \u043b\u0435\u0436\u0438\u0442 Puffin Deletion Vector. SQL \u043d\u0430 \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u0438 \u0442\u043e\u0442 \u0436\u0435, \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043c\u0435\u0445\u0430\u043d\u0438\u043a\u0430 \u0434\u0440\u0443\u0433\u0430\u044f.<\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0447\u0435\u0440\u0435\u0437 system table:<\/p>\n<pre><code class=\"sql\">SELECT content, file_path, record_countFROM orders_v3$files;<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0412 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u043c V3-\u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438 \u0432\u044b \u043e\u0436\u0438\u0434\u0430\u0435\u0442\u0435 \u0443\u0432\u0438\u0434\u0435\u0442\u044c data file \u0438 <code>.puffin<\/code> DV, \u0430 \u043d\u0435 \u0440\u0430\u0441\u0442\u0443\u0449\u0438\u0439 \u0441\u043f\u0438\u0441\u043e\u043a <code>...delete.parquet<\/code>.<\/p>\n<h4>\u0427\u0442\u043e \u0434\u0430\u044e\u0442 \u0447\u0438\u0441\u043b\u0430<\/h4>\n<p>\u0412 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d Doris-side benchmark \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f\u0445. \u0421\u0430\u043c\u043e\u0435 \u0432\u0430\u0436\u043d\u043e\u0435:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p align=\"left\">\u0421\u0446\u0435\u043d\u0430\u0440\u0438\u0439<\/p>\n<\/th>\n<th>\n<p align=\"left\">Iceberg V2: Position Deletes<\/p>\n<\/th>\n<th>\n<p align=\"left\">Iceberg V3: Deletion Vector<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">16 data files, 20% deleted<\/p>\n<\/td>\n<td>\n<p align=\"left\">336 files to open: 16 data + 320 delete<\/p>\n<\/td>\n<td>\n<p align=\"left\">17 files: 16 data + 1 Puffin<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">100M rows, 99% deleted<\/p>\n<\/td>\n<td>\n<p align=\"left\">98 MiB delete storage<\/p>\n<\/td>\n<td>\n<p align=\"left\">3.8 MiB DV storage<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">Delete metadata reduction<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2014<\/p>\n<\/td>\n<td>\n<p align=\"left\">~96%<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>Latency \u043d\u0430 16 data files \u0438 1M rows:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p align=\"left\">Delete %<\/p>\n<\/th>\n<th>\n<p align=\"left\">Doris V2<\/p>\n<\/th>\n<th>\n<p align=\"left\">Doris V3<\/p>\n<\/th>\n<th>\n<p align=\"left\">Speedup<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">5%<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.31s<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.15s<\/p>\n<\/td>\n<td>\n<p align=\"left\">2.1x<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">10%<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.35s<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.16s<\/p>\n<\/td>\n<td>\n<p align=\"left\">2.2x<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">20%<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.43s<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.17s<\/p>\n<\/td>\n<td>\n<p align=\"left\">2.5x<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">30%<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.46s<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.14s<\/p>\n<\/td>\n<td>\n<p align=\"left\">3.3x<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">40%<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.39s<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.17s<\/p>\n<\/td>\n<td>\n<p align=\"left\">2.3x<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0414\u043b\u044f large file \u0441 99% deleted:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p align=\"left\">Table version<\/p>\n<\/th>\n<th>\n<p align=\"left\">Doris Q1<\/p>\n<\/th>\n<th>\n<p align=\"left\">Doris Q2<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">V2, Position Delete<\/p>\n<\/td>\n<td>\n<p align=\"left\">3.42s<\/p>\n<\/td>\n<td>\n<p align=\"left\">3.28s<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">V3, Deletion Vector<\/p>\n<\/td>\n<td>\n<p align=\"left\">1.03s<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.86s<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">Speedup<\/p>\n<\/td>\n<td>\n<p align=\"left\">~3x<\/p>\n<\/td>\n<td>\n<p align=\"left\">~3x<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/\/post_images\/e9e\/bb3\/c5b\/e9ebb3c5b50788df5fff58433659264c.png\" alt=\"Doris on Iceberg V3 Deletion Vector performance\" sizes=\"(max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/\/post_images\/e9e\/bb3\/c5b\/e9ebb3c5b50788df5fff58433659264c.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/\/post_images\/e9e\/bb3\/c5b\/e9ebb3c5b50788df5fff58433659264c.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>Doris on Iceberg V3 Deletion Vector performance<\/figcaption><\/div>\n<\/figure>\n<p><em>Doris V3 vs V2: latency \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u043f\u043b\u043e\u0441\u043a\u043e\u0439 \u043f\u0440\u0438 \u0440\u043e\u0441\u0442\u0435 delete ratio, \u0432 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u043a V2 \u0434\u0435\u0433\u0440\u0430\u0434\u0438\u0440\u0443\u0435\u0442 \u043b\u0438\u043d\u0435\u0439\u043d\u043e. \u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a: \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f Mingyu Chen.<\/em> <\/p>\n<p>\u0421\u043c\u044b\u0441\u043b \u043d\u0435 \u0432 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c \u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u0435 \u00ab\u0432\u0441\u0435\u0433\u0434\u0430 3x\u00bb. \u041f\u0430\u0442\u0442\u0435\u0440\u043d \u0434\u0440\u0443\u0433\u043e\u0439: \u043f\u043e\u0434 V2 anti-join cost \u0440\u0430\u0441\u0442\u0451\u0442 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0447\u0438\u0441\u043b\u043e\u043c delete files, \u0438 query latency \u0434\u0435\u0433\u0440\u0430\u0434\u0438\u0440\u0443\u0435\u0442 \u043f\u043e \u043c\u0435\u0440\u0435 \u0440\u043e\u0441\u0442\u0430 delete ratio. \u041f\u043e\u0434 V3 bitmap \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0437\u0430 \u043e\u0434\u0438\u043d \u043f\u0440\u043e\u0445\u043e\u0434, \u0438 latency \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u043b\u043e\u0441\u043a\u043e\u0439 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043e\u0442 \u0442\u043e\u0433\u043e, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0440\u043e\u043a \u043f\u043e\u043c\u0435\u0447\u0435\u043d\u043e \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435.<\/p>\n<h4>\u0427\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e Doris \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u0434\u043b\u044f Deletion Vectors<\/h4>\n<p>\u0412\u0430\u0436\u043d\u044b\u0439 \u043d\u044e\u0430\u043d\u0441 \u0438\u0437 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u0430: \u0447\u0442\u043e\u0431\u044b Deletion Vectors \u043f\u0440\u0438\u043d\u043e\u0441\u0438\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u0443, \u0434\u0432\u0438\u0436\u043e\u043a \u0434\u043e\u043b\u0436\u0435\u043d \u0443\u043c\u0435\u0442\u044c \u0438 \u0447\u0438\u0442\u0430\u0442\u044c, \u0438 \u043f\u0438\u0441\u0430\u0442\u044c DV. Read-only \u0434\u0432\u0438\u0436\u043e\u043a \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u0442\u044c DV, \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u043a\u0435\u043c-\u0442\u043e \u0434\u0440\u0443\u0433\u0438\u043c, \u043d\u043e \u0441\u0430\u043c \u0438\u0445 \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u0451\u0442. Write-only \u0434\u0432\u0438\u0436\u043e\u043a \u0441\u043e\u0437\u0434\u0430\u0451\u0442 DV, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0435\u0442.<\/p>\n<p>Doris 4.1 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043e\u0431\u0435 \u0441\u0442\u043e\u0440\u043e\u043d\u044b:<\/p>\n<ul>\n<li>\n<p><strong>Read:<\/strong> Puffin-format Deletion Vectors \u0447\u0438\u0442\u0430\u044e\u0442\u0441\u044f \u0431\u0435\u0437 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438. V3-\u0442\u0430\u0431\u043b\u0438\u0446\u044b queryable \u0441\u0440\u0430\u0437\u0443.<\/p>\n<\/li>\n<li>\n<p><strong>Write:<\/strong> <code>DELETE<\/code>, <code>UPDATE<\/code>, <code>MERGE INTO<\/code> \u043d\u0430 V3-\u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0437\u0434\u0430\u044e\u0442 Puffin DV \u0432\u043c\u0435\u0441\u0442\u043e Position Delete files. \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c <code>format-version = 3<\/code> \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u2014 SQL-\u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u043d\u0435 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f.<\/p>\n<\/li>\n<\/ul>\n<h4>Caveats \u043f\u043e Deletion Vectors<\/h4>\n<p>\u0422\u0440\u0438 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f:<\/p>\n<ul>\n<li>\n<p><code>DELETE<\/code>, <code>UPDATE<\/code>, <code>MERGE INTO<\/code> \u0442\u0440\u0435\u0431\u0443\u044e\u0442 <code>format-version &gt;= 2<\/code>.<\/p>\n<\/li>\n<li>\n<p>Deletion Vectors \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 <code>format-version = 3<\/code>.<\/p>\n<\/li>\n<li>\n<p>Concurrent writes \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 Iceberg optimistic concurrency control, \u0442\u0430\u043a \u0447\u0442\u043e \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u044b \u0431\u0443\u0434\u0443\u0442 \u0432\u0441\u043f\u043b\u044b\u0432\u0430\u0442\u044c \u043a\u0430\u043a transaction exceptions. \u0414\u043b\u044f high-conflict workloads \u043d\u0443\u0436\u043d\u044b retry \u0438\u043b\u0438 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f.<\/p>\n<\/li>\n<\/ul>\n<hr\/>\n<h3>\u0427\u0430\u0441\u0442\u044c 6: Row Lineage \u2014 watermark \u0434\u043b\u044f CDC \u0431\u0435\u0437 snapshot diff<\/h3>\n<p>Deletion Vectors \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0442 \u043d\u0430 performance debt. \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u043e observability debt.<\/p>\n<p>\u0412 Iceberg V1\/V2 change tracking \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0436\u0438\u0432\u0451\u0442 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 snapshot. \u042d\u0442\u043e \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u043b\u044f \u043c\u043d\u043e\u0433\u0438\u0445 \u0437\u0430\u0434\u0430\u0447, \u043d\u043e \u0443 \u043d\u0435\u0451 \u0435\u0441\u0442\u044c \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u044b\u0439 \u044d\u0444\u0444\u0435\u043a\u0442: \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0439 rewrite \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043a\u0430\u043a \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435.<\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<ul>\n<li>\n<p>downstream-\u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u0430 \u043d\u0430 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f Iceberg-\u0442\u0430\u0431\u043b\u0438\u0446\u044b;<\/p>\n<\/li>\n<li>\n<p>\u043e\u043d\u0430 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442 snapshots;<\/p>\n<\/li>\n<li>\n<p>\u043c\u0435\u0436\u0434\u0443 checkpoint\u2019\u0430\u043c\u0438 \u043f\u0440\u043e\u0448\u0451\u043b <code>rewrite_data_files<\/code>;<\/p>\n<\/li>\n<li>\n<p>\u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0444\u0430\u0439\u043b\u044b \u043d\u043e\u0432\u044b\u0435, snapshot \u043d\u043e\u0432\u044b\u0439;<\/p>\n<\/li>\n<li>\n<p>downstream \u043d\u0435 \u0437\u043d\u0430\u0435\u0442, \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0438\u0441\u044c \u0441\u0442\u0440\u043e\u043a\u0438 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438 \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u0435\u0445\u0430\u043b\u0438 \u043c\u0435\u0436\u0434\u0443 \u0444\u0430\u0439\u043b\u0430\u043c\u0438.<\/p>\n<\/li>\n<\/ul>\n<p>\u0418 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u043f\u0435\u0440\u0435\u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043b\u0438\u0448\u043d\u0435\u0435.<\/p>\n<p>Iceberg V3 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 Row Lineage: \u0434\u0432\u0435 \u0441\u043a\u0440\u044b\u0442\u044b\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u043a\u043e\u043b\u043e\u043d\u043a\u0438 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/\/post_images\/1a2\/1dc\/7d5\/1a21dc7d516699464a59ad47ab86eb87.png\" alt=\"Iceberg V3 Row Lineage hidden columns\" sizes=\"(max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/\/post_images\/1a2\/1dc\/7d5\/1a21dc7d516699464a59ad47ab86eb87.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/\/post_images\/1a2\/1dc\/7d5\/1a21dc7d516699464a59ad47ab86eb87.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>Iceberg V3 Row Lineage hidden columns<\/figcaption><\/div>\n<\/figure>\n<p><em>Row Lineage: <\/em><code><em>_row_id<\/em><\/code><em> \u0434\u0430\u0451\u0442 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u0443\u044e \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u043e\u0441\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0438, <\/em><code><em>_last_updated_sequence_number<\/em><\/code><em> \u2014 watermark \u0434\u043b\u044f CDC. \u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a: \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f Mingyu Chen.<\/em> <\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p align=\"left\">\u041a\u043e\u043b\u043e\u043d\u043a\u0430<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u0427\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><code>_row_id<\/code><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u0439 numeric identifier \u0441\u0442\u0440\u043e\u043a\u0438<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><code>_last_updated_sequence_number<\/code><\/p>\n<\/td>\n<td>\n<p align=\"left\">sequence number \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0441\u0442\u0440\u043e\u043a\u0438<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u041e\u0431\u0435 \u043a\u043e\u043b\u043e\u043d\u043a\u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439. \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043d\u0435 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0438\u0445 \u0440\u0443\u043a\u0430\u043c\u0438.<\/p>\n<p>\u0421\u0430\u043c\u0430\u044f \u0432\u0430\u0436\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c: <code>_last_updated_sequence_number<\/code> \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u043c <code>UPDATE<\/code> \u0438\u043b\u0438 <code>MERGE INTO<\/code>, \u043d\u043e \u043d\u0435 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0438 compaction \u0438 physical rewrite. \u0417\u043d\u0430\u0447\u0438\u0442, \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a CDC watermark.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"sql\">CREATE TABLE users_v3 (    id INT,    name STRING,    email STRING) PROPERTIES ('format-version' = '3');SET show_hidden_columns = true;INSERT INTO users_v3 VALUES    (1, 'Alice', 'alice@x.com'),    (2, 'Bob',   'bob@x.com'),    (3, 'Carol', 'carol@x.com');SELECT id, name, email, _row_id, _last_updated_sequence_numberFROM users_v3;<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0432\u043e\u0433\u043e insert \u0432\u0441\u0435 \u0442\u0440\u0438 \u0441\u0442\u0440\u043e\u043a\u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u0435 <code>_row_id<\/code>, \u0430 <code>_last_updated_sequence_number<\/code> \u0440\u0430\u0432\u0435\u043d <code>1<\/code>.<\/p>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u043c\u0435\u043d\u044f\u0435\u043c Bob:<\/p>\n<pre><code class=\"sql\">UPDATE users_v3SET email = 'bob@newmail.com'WHERE id = 2;<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0423 Bob <code>_row_id<\/code> \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u0442\u0435\u043c \u0436\u0435, \u043d\u043e <code>_last_updated_sequence_number<\/code> \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f <code>2<\/code>. Alice \u0438 Carol \u043e\u0441\u0442\u0430\u044e\u0442\u0441\u044f \u0441 <code>SN = 1<\/code>.<\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c Dora:<\/p>\n<pre><code class=\"sql\">INSERT INTO users_v3VALUES (4, 'Dora', 'dora@x.com');<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>Dora \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043d\u043e\u0432\u044b\u0439 <code>_row_id<\/code> \u0438 <code>SN = 3<\/code>.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c downstream, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d \u043f\u043e watermark <code>1<\/code>, \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"sql\">SELECT id, name, email, _last_updated_sequence_numberFROM users_v3WHERE _last_updated_sequence_number &gt; 1;<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0412\u0435\u0440\u043d\u0443\u0442\u0441\u044f Bob \u0438 Dora. Alice \u0438 Carol \u043d\u0435 \u043f\u043e\u043f\u0430\u0434\u0443\u0442 \u0432 pipeline. \u0415\u0441\u043b\u0438 \u043c\u0435\u0436\u0434\u0443 checkpoint\u2019\u0430\u043c\u0438 \u0441\u043b\u0443\u0447\u0438\u0442\u0441\u044f compaction, \u043e\u043d\u0438 \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u043d\u0435 \u043f\u043e\u043f\u0430\u0434\u0443\u0442, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e physical rewrite \u043d\u0435 \u0434\u0432\u0438\u0433\u0430\u0435\u0442 <code>_last_updated_sequence_number<\/code>.<\/p>\n<p>\u042d\u0442\u043e \u0438 \u0435\u0441\u0442\u044c \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u0432\u044b\u0438\u0433\u0440\u044b\u0448: downstream \u0445\u0440\u0430\u043d\u0438\u0442 \u043e\u0434\u0438\u043d integer watermark, \u0430 \u043d\u0435 \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u0443\u0433\u0430\u0434\u044b\u0432\u0430\u0442\u044c \u0441\u043c\u044b\u0441\u043b snapshot diff.<\/p>\n<h4>\u041a\u0430\u043a \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f CDC-pipeline<\/h4>\n<p>\u041a\u043e\u043d\u0442\u0440\u0430\u0441\u0442 \u0432 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435:<\/p>\n<p><strong>V2 (snapshot diff):<\/strong> Upstream (PostgreSQL \u0438 \u0442.\u0434.) \u2192 Flink CDC \u2192 Iceberg V2 Sink \u2192 Downstream \u0434\u0435\u043b\u0430\u0435\u0442 snapshot diff, \u043d\u043e \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u043b\u0438\u0447\u0438\u0442\u044c \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043e\u0442 compaction\/rewrite \u2192 false positives \u2192 \u043f\u0435\u0440\u0435\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430.<\/p>\n<p><strong>V3 (Row Lineage):<\/strong> Upstream \u2192 Flink CDC \u2192 Iceberg V3 Sink \u2192 Downstream \u0434\u0435\u043b\u0430\u0435\u0442 <code>WHERE _last_updated_sequence_number &gt; :watermark<\/code> \u2192 \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u2192 \u0431\u0435\u0437 false positives.<\/p>\n<p>\u0420\u0430\u0437\u043d\u0438\u0446\u0430 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438, \u043d\u043e \u0438 \u0432 \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0435: \u0432\u043c\u0435\u0441\u0442\u043e \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u043b\u044f snapshot diffing \u2014 \u043e\u0434\u0438\u043d SQL-\u0437\u0430\u043f\u0440\u043e\u0441 \u0441 \u043e\u0434\u043d\u0438\u043c integer watermark.<\/p>\n<h4>\u0427\u0442\u043e Doris \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u0434\u043b\u044f Row Lineage<\/h4>\n<p>\u0412 Doris \u0441\u043a\u0440\u044b\u0442\u044b\u0435 \u043a\u043e\u043b\u043e\u043d\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u0447\u0438\u0442\u0430\u0442\u044c \u044f\u0432\u043d\u043e \u0438\u043b\u0438 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0438\u0445 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435:<\/p>\n<pre><code class=\"sql\">SET show_hidden_columns = true;<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p><code>UPDATE<\/code> \u0438 <code>MERGE INTO<\/code> \u043d\u0430 V3-\u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u044e\u0442 <code>_last_updated_sequence_number<\/code>. \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043d\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 audit trigger, \u043d\u0435 \u043f\u0438\u0448\u0435\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443 lineage, \u043d\u0435 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0432\u043d\u0435\u0448\u043d\u0438\u0439 log.<\/p>\n<p>\u041d\u043e caveat \u0441\u043d\u043e\u0432\u0430 \u0432\u0430\u0436\u043d\u044b\u0439: Row Lineage \u0432 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u0435 \u043f\u043e\u043c\u0435\u0447\u0435\u043d \u043a\u0430\u043a experimental. \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u043d\u0430 \u0441\u0432\u043e\u0451\u043c workload \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e.<\/p>\n<hr\/>\n<h3>\u0427\u0430\u0441\u0442\u044c 7: Audit trail \u0447\u0435\u0440\u0435\u0437 _row_id<\/h3>\n<p>\u0415\u0449\u0451 \u043e\u0434\u0438\u043d \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0439 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u2014 \u0430\u0443\u0434\u0438\u0442.<\/p>\n<p>\u0424\u0438\u043d\u0430\u043d\u0441\u043e\u0432\u044b\u0439 \u0430\u0443\u0434\u0438\u0442\u043e\u0440 \u0441\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442: \u00abOrder 102 \u043c\u0435\u043d\u044f\u043b\u0441\u044f \u0442\u0440\u0438 \u0440\u0430\u0437\u0430. \u041a\u0430\u043a\u0438\u0435 \u0441\u0443\u043c\u043c\u044b \u0431\u044b\u043b\u0438 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u0448\u0430\u0433\u0435?\u00bb<\/p>\n<p>\u0412 V2 \u043e\u0431\u044b\u0447\u043d\u043e \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0438\u0434\u0442\u0438 \u0432\u043e \u0432\u043d\u0435\u0448\u043d\u044e\u044e audit log, \u043f\u043e\u0442\u043e\u043c \u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0435\u0451 \u0441 \u0442\u0435\u043a\u0443\u0449\u0438\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u043f\u043e\u0442\u043e\u043c \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c compaction, file rewrite \u0438 \u043f\u0440\u043e\u0447\u0438\u0435 \u0440\u0430\u0434\u043e\u0441\u0442\u0438 \u0436\u0438\u0437\u043d\u0438. \u042d\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043d\u043e \u0445\u0440\u0443\u043f\u043a\u043e: audit system \u0438 table state \u0436\u0438\u0432\u0443\u0442 \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u043c\u0435\u0441\u0442\u0430\u0445.<\/p>\n<p>\u0412 V3 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u0443\u0434\u043e\u0431\u043d\u0430\u044f \u043e\u043f\u043e\u0440\u0430: <code>_row_id<\/code> \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f lifetime identity \u0441\u0442\u0440\u043e\u043a\u0438.<\/p>\n<p>\u0423\u0441\u043b\u043e\u0432\u043d\u043e:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p align=\"left\">Snapshot SN<\/p>\n<\/th>\n<th>\n<p align=\"left\">Amount<\/p>\n<\/th>\n<th>\n<p align=\"left\">Event<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">SN=1<\/p>\n<\/td>\n<td>\n<p align=\"left\">80.00<\/p>\n<\/td>\n<td>\n<p align=\"left\">Order created<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">SN=2<\/p>\n<\/td>\n<td>\n<p align=\"left\">90.00<\/p>\n<\/td>\n<td>\n<p align=\"left\">Customer complaint, partial refund<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">SN=3<\/p>\n<\/td>\n<td>\n<p align=\"left\">100.00<\/p>\n<\/td>\n<td>\n<p align=\"left\">Final settlement<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0421\u0430\u043c\u0430 Row Lineage \u043d\u0435 \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u0442 time travel \u0438 \u043d\u0435 \u0445\u0440\u0430\u043d\u0438\u0442 \u043f\u043e\u043b\u043d\u0443\u044e \u0438\u0441\u0442\u043e\u0440\u0438\u044e \u00ab\u043c\u0430\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u00bb. \u0412\u0430\u0436\u043d\u0430\u044f \u0434\u0435\u0442\u0430\u043b\u044c \u0438\u043c\u0435\u043d\u043d\u043e \u0432 \u0441\u0432\u044f\u0437\u043a\u0435:<\/p>\n<ul>\n<li>\n<p><code>_row_id<\/code> \u0434\u0430\u0451\u0442 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u044e\u0447 \u0441\u0442\u0440\u043e\u043a\u0438;<\/p>\n<\/li>\n<li>\n<p>snapshots\/time travel \u0434\u0430\u044e\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043f\u0440\u043e\u0448\u043b\u044b\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f;<\/p>\n<\/li>\n<li>\n<p><code>_last_updated_sequence_number<\/code> \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0445\u0440\u043e\u043d\u043e\u043b\u043e\u0433\u0438\u044e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439;<\/p>\n<\/li>\n<li>\n<p>compaction \u043d\u0435 \u043b\u043e\u043c\u0430\u0435\u0442 \u044d\u0442\u0443 \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u043e\u0441\u0442\u044c.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u0434\u043b\u044f \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f:<\/p>\n<pre><code class=\"sql\">SELECT order_id, amountFROM orders_v3 FOR VERSION AS OF &lt;snapshot_id_at_SN2&gt;WHERE _row_id = 1;<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0414\u0430, \u0432\u0430\u043c \u0432\u0441\u0451 \u0435\u0449\u0451 \u043d\u0443\u0436\u043d\u044b snapshots. \u041d\u043e <code>_row_id<\/code> \u0438 <code>_last_updated_sequence_number<\/code> \u2014 \u044d\u0442\u043e \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0441\u0442\u0440\u043e\u043a\u0438, \u0430 \u043d\u0435 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0435. \u0415\u0441\u043b\u0438 \u043c\u0435\u0436\u0434\u0443 \u0448\u0430\u0433\u0430\u043c\u0438 \u043f\u0440\u043e\u0448\u0451\u043b <code>ALTER TABLE orders_v3 EXECUTE rewrite_data_files()<\/code>, \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0444\u0430\u0439\u043b\u044b \u0431\u0443\u0434\u0443\u0442 \u043d\u043e\u0432\u044b\u0435, \u0430 <code>_row_id<\/code> \u043e\u0441\u0442\u0430\u043d\u0435\u0442\u0441\u044f \u043f\u0440\u0435\u0436\u043d\u0438\u043c \u0438 <code>SN<\/code> \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u0441\u044f. \u041f\u043e\u0434 V2 \u0442\u043e\u0442 \u0436\u0435 compaction \u0441\u043e\u0437\u0434\u0430\u043b \u0431\u044b \u043d\u043e\u0432\u044b\u0439 snapshot, \u0438 \u0431\u0435\u0437 \u0432\u043d\u0435\u0448\u043d\u0435\u0439 audit log \u0432\u044b \u0431\u044b \u043d\u0435 \u0437\u043d\u0430\u043b\u0438, \u043c\u0435\u043d\u044f\u043b\u0438\u0441\u044c \u0441\u0442\u0440\u043e\u043a\u0438 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438 \u0438\u043b\u0438 \u043d\u0435\u0442.<\/p>\n<hr\/>\n<h3>\u0427\u0430\u0441\u0442\u044c 8: Quick Start<\/h3>\n<p>\u0415\u0441\u043b\u0438 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u043e\u0442\u0440\u043e\u0433\u0430\u0442\u044c \u043c\u0435\u0445\u0430\u043d\u0438\u043a\u0443 \u0440\u0443\u043a\u0430\u043c\u0438, \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0443\u0442\u044c \u0442\u0430\u043a\u043e\u0439.<\/p>\n<h4>Prerequisites<\/h4>\n<p>\u041d\u0443\u0436\u043d\u044b:<\/p>\n<ul>\n<li>\n<p>Apache Doris 4.1.0 \u0438\u043b\u0438 \u043d\u043e\u0432\u0435\u0435 (<a href=\"https:\/\/doris.apache.org\/download\/\" rel=\"noopener noreferrer nofollow\">\u0441\u043a\u0430\u0447\u0430\u0442\u044c<\/a> \u0438\u043b\u0438 <code>docker pull apache\/doris:4.1.0<\/code>).<\/p>\n<\/li>\n<li>\n<p>Iceberg catalog \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 V3.<\/p>\n<\/li>\n<li>\n<p>Object store, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0439 Doris BE: S3, MinIO, OSS \u0438\u043b\u0438 HDFS.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u043e catalog\u2019\u0430\u043c \u0432 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u044f \u0442\u0430\u043a\u0430\u044f:<\/p>\n<ul>\n<li>\n<p>REST Catalog \u2014 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043d\u0430\u0434\u0451\u0436\u043d\u044b\u0439 \u043f\u0443\u0442\u044c \u0434\u043b\u044f V3. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, Apache Polaris, Lakekeeper \u0438\u043b\u0438 Tabular open-source REST catalog image.<\/p>\n<\/li>\n<li>\n<p>Hive Metastore-backed catalogs \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0442 \u0434\u043b\u044f V1\/V2 reads, \u043d\u043e \u043e\u0442\u0441\u0442\u0430\u044e\u0442 \u043f\u043e V3.<\/p>\n<\/li>\n<li>\n<p>AWS Glue \u0438 Aliyun DLF \u043d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0443\u043a\u0430\u0437\u0430\u043d\u044b \u043a\u0430\u043a read-only.<\/p>\n<\/li>\n<\/ul>\n<h4>1. \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c catalog<\/h4>\n<pre><code class=\"sql\">CREATE CATALOG iceberg_v3 PROPERTIES (    'type'                 = 'iceberg',    'iceberg.catalog.type' = 'rest',    'uri'                  = 'http:\/\/your-rest-catalog:8181',    'warehouse'            = 's3:\/\/your-bucket\/warehouse',    's3.endpoint'          = 'https:\/\/s3.us-west-2.amazonaws.com',    's3.access_key'        = '&lt;AK&gt;',    's3.secret_key'        = '&lt;SK&gt;',    's3.region'            = 'us-west-2');SWITCH iceberg_v3;CREATE DATABASE IF NOT EXISTS demo;USE demo;<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h4>2. \u0421\u043e\u0437\u0434\u0430\u0442\u044c V3-\u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c DML<\/h4>\n<pre><code class=\"sql\">CREATE TABLE orders (    id INT,    status STRING,    amount DECIMAL(10,2)) PROPERTIES ('format-version' = '3');INSERT INTO orders VALUES    (1, 'pending', 100),    (2, 'pending', 200),    (3, 'pending', 300);UPDATE orders SET status = 'shipped' WHERE id = 1;DELETE FROM orders WHERE id = 3;<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h4>3. \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c V3-\u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h4>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 Deletion Vector:<\/p>\n<pre><code class=\"sql\">SELECT content, file_path, record_countFROM orders$files;<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041e\u0436\u0438\u0434\u0430\u0435\u043c <code>.puffin<\/code> DV \u0440\u044f\u0434\u043e\u043c \u0441 data file, \u0430 \u043d\u0435 \u0440\u043e\u0441\u0441\u044b\u043f\u044c parquet delete files.<\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 Row Lineage (\u0441\u043a\u0440\u044b\u0442\u044b\u0435 \u043a\u043e\u043b\u043e\u043d\u043a\u0438 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043d\u0435 \u0432\u0438\u0434\u043d\u044b):<\/p>\n<pre><code class=\"sql\">SET show_hidden_columns = true;SELECT id, status, _row_id, _last_updated_sequence_numberFROM orders;<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h4>4. \u041f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c MERGE INTO<\/h4>\n<pre><code class=\"sql\">MERGE INTO orders tUSING (SELECT 1 AS id, 'delivered' AS status, 110 AS amount) sON t.id = s.idWHEN MATCHED THEN UPDATE SET status = s.status, amount = s.amountWHEN NOT MATCHED THEN INSERT (id, status, amount)VALUES (s.id, s.status, s.amount);<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u0435: <code>MERGE INTO<\/code> experimental. \u042d\u0442\u043e \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442 \u0434\u043b\u044f POC, \u043d\u043e \u043d\u0435 \u0434\u043b\u044f blind rollout \u0432 production.<\/p>\n<p>\u0415\u0441\u043b\u0438 <code>orders$files<\/code> \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043e\u0434\u0438\u043d Puffin file \u0440\u044f\u0434\u043e\u043c \u0441 data file, \u0430 \u0432\u044b\u0436\u0438\u0432\u0448\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u043d\u0435\u0441\u0443\u0442 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <code>_row_id<\/code> \/ <code>_last_updated_sequence_number<\/code> \u2014 \u0432\u0430\u0448 \u0441\u0442\u0435\u043a V3-ready end to end.<\/p>\n<p>\u041f\u043e\u043b\u043d\u044b\u0439 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a \u043f\u043e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438: <a href=\"https:\/\/doris.apache.org\/docs\/lakehouse\/catalogs\/iceberg-catalog\" rel=\"noopener noreferrer nofollow\">Doris Iceberg catalog docs<\/a>.<\/p>\n<hr\/>\n<h3>\u0427\u0430\u0441\u0442\u044c 9: Common gotchas<\/h3>\n<p>\u041a\u043e\u0440\u043e\u0442\u043a\u0438\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0442\u043e\u0433\u043e, \u043e\u0431\u043e \u0447\u0442\u043e \u043b\u0435\u0433\u043a\u043e \u0443\u0434\u0430\u0440\u0438\u0442\u044c\u0441\u044f:<\/p>\n<ul>\n<li>\n<p><code>format-version = 3<\/code> \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438\u043b\u0438 \u043c\u0438\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e V2-\u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0447\u0435\u0440\u0435\u0437 <code>ALTER TABLE ... SET PROPERTIES ('format-version' = '3')<\/code>.<\/p>\n<\/li>\n<li>\n<p>Hidden columns (<code>_row_id<\/code>, <code>_last_updated_sequence_number<\/code>) \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 V3. \u041d\u0430 V1\/V2 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445 \u0437\u0430\u043f\u0440\u043e\u0441 \u043a \u043d\u0438\u043c \u0434\u0430\u0441\u0442 \u043e\u0448\u0438\u0431\u043a\u0443.<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 <code>MERGE INTO<\/code> \u043d\u0435 \u043f\u0430\u0440\u0441\u0438\u0442\u0441\u044f, \u043f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 Doris 4.1.0+ \u0438 target table V2\/V3.<\/p>\n<\/li>\n<li>\n<p>DML \u0442\u0440\u0435\u0431\u0443\u0435\u0442 <code>format-version &gt;= 2<\/code>; Deletion Vectors \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 V3.<\/p>\n<\/li>\n<li>\n<p>Concurrent writers \u043c\u043e\u0433\u0443\u0442 \u043b\u043e\u0432\u0438\u0442\u044c optimistic concurrency conflicts. \u0414\u043b\u044f high-conflict workloads \u043d\u0443\u0436\u043d\u044b retry, backoff \u0438\u043b\u0438 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f.<\/p>\n<\/li>\n<li>\n<p>REST Catalog behavior \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438. \u0414\u043b\u044f production \u043b\u0443\u0447\u0448\u0435 \u0441\u0432\u0435\u0440\u0438\u0442\u044c\u0441\u044f \u0441 support matrix \u0432 Doris docs.<\/p>\n<\/li>\n<li>\n<p>AWS Glue \u0438 Aliyun DLF \u0432 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u044b \u043a\u0430\u043a read-only \u043d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u0441\u0442\u0430\u0442\u044c\u0438.<\/p>\n<\/li>\n<\/ul>\n<hr\/>\n<h3>\u0427\u0430\u0441\u0442\u044c 10: \u0413\u0434\u0435 \u0433\u0440\u0430\u043d\u0438\u0446\u0430 Doris, Spark \u0438 Flink<\/h3>\n<p>\u0421\u0430\u043c\u0430\u044f \u043e\u043f\u0430\u0441\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0437\u0432\u0443\u0447\u0430\u043b\u0430 \u0431\u044b \u0442\u0430\u043a: \u00ab\u0422\u0435\u043f\u0435\u0440\u044c Doris \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u0442 Spark \u0434\u043b\u044f Iceberg\u00bb.<\/p>\n<p>\u042d\u0442\u043e \u043f\u043b\u043e\u0445\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f. \u041d\u0435 \u043d\u0430\u0434\u043e \u0442\u0430\u043a.<\/p>\n<p>\u0411\u043e\u043b\u0435\u0435 \u0447\u0435\u0441\u0442\u043d\u0430\u044f \u043c\u0430\u0442\u0440\u0438\u0446\u0430:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p align=\"left\">\u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u0413\u0434\u0435 \u0443\u043c\u0435\u0441\u0442\u0435\u043d<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">Doris<\/p>\n<\/td>\n<td>\n<p align=\"left\">real-time queries, small DML, incremental reconciliation, row-level provenance, day-to-day maintenance, \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0430 Iceberg tables \u0438\u0437 SQL<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">Spark<\/p>\n<\/td>\n<td>\n<p align=\"left\">heavy backfills, cross-source ETL, long-running batch jobs<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">Flink<\/p>\n<\/td>\n<td>\n<p align=\"left\">streaming ingestion, continuous CDC write paths<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>Doris 4.1 \u043d\u0435 \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u0442 Spark. \u041e\u043d \u0441\u043e\u043a\u0440\u0430\u0449\u0430\u0435\u0442 \u0447\u0438\u0441\u043b\u043e \u0441\u043b\u0443\u0447\u0430\u0435\u0432, \u043a\u043e\u0433\u0434\u0430 Spark \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0440\u0430\u0434\u0438 \u043c\u0435\u043b\u043a\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0432\u043e\u043a\u0440\u0443\u0433 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0432\u044b \u0443\u0436\u0435 \u043d\u0430\u0448\u043b\u0438.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0437\u0430\u043f\u0440\u043e\u0441 \u0443\u0436\u0435 \u043f\u0440\u0438\u0432\u0451\u043b \u0432\u0430\u0441 \u0432 SQL-\u043a\u043b\u0438\u0435\u043d\u0442 \u2014 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u0435 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u0432 distributed-computing \u0440\u0438\u0442\u0443\u0430\u043b \u0441 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u043c.<\/p>\n<hr\/>\n<h3>\u0418\u0442\u043e\u0433<\/h3>\n<p>\u041e\u0434\u043d\u0430 \u0444\u0440\u0430\u0437\u0430 \u0445\u043e\u0440\u043e\u0448\u043e \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 Doris \u043d\u0430 Iceberg:<\/p>\n<blockquote>\n<p>\u0415\u0441\u043b\u0438 \u0437\u0430\u043f\u0440\u043e\u0441 \u0443\u0436\u0435 \u043f\u0440\u0438\u0432\u0451\u043b \u0432\u0430\u0441 \u0432 SQL-\u043a\u043b\u0438\u0435\u043d\u0442, \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u0435 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435, incremental reconciliation \u0438\u043b\u0438 day-to-day maintenance \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0437\u0430\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0443\u0445\u043e\u0434\u0438\u0442\u044c \u0432 \u0434\u0440\u0443\u0433\u043e\u0439 \u0434\u0432\u0438\u0436\u043e\u043a.<\/p>\n<\/blockquote>\n<p>\u0427\u0442\u043e \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0432 Apache Doris 4.1:<\/p>\n<ul>\n<li>\n<p><code>UPDATE<\/code>, <code>DELETE<\/code>, <code>MERGE INTO<\/code> \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u044e\u0442 loop \u00abquery \u2192 fix \u2192 verify\u00bb \u0432\u043d\u0443\u0442\u0440\u0438 \u043e\u0434\u043d\u043e\u0433\u043e SQL-\u043a\u043b\u0438\u0435\u043d\u0442\u0430.<\/p>\n<\/li>\n<li>\n<p>Deletion Vectors \u0432 Iceberg V3 \u043d\u0435 \u0434\u0430\u044e\u0442 DML \u043d\u0430\u043a\u0430\u043f\u043b\u0438\u0432\u0430\u0442\u044c performance debt \u0447\u0435\u0440\u0435\u0437 \u0440\u0430\u0441\u0442\u0443\u0449\u0438\u0439 \u043d\u0430\u0431\u043e\u0440 Position Delete files.<\/p>\n<\/li>\n<li>\n<p>Row Lineage \u0434\u0430\u0451\u0442 <code>_row_id<\/code> \u0438 <code>_last_updated_sequence_number<\/code>, \u0447\u0442\u043e\u0431\u044b CDC \u0438 audit \u043d\u0435 \u043b\u043e\u043c\u0430\u043b\u0438\u0441\u044c \u043e\u0442 compaction \u0438 physical rewrite.<\/p>\n<\/li>\n<li>\n<p>Maintenance \u0438 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0430 \u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442\u0441\u044f \u0431\u043b\u0438\u0436\u0435 \u043a \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0436\u0435 \u0441\u043c\u043e\u0442\u0440\u0438\u0442 \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0435.<\/p>\n<\/li>\n<\/ul>\n<p>\u0427\u0442\u043e \u043d\u0435 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f:<\/p>\n<ul>\n<li>\n<p>Spark \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u0434\u043b\u044f \u0442\u044f\u0436\u0451\u043b\u044b\u0445 batch\/backfill\/ETL \u0437\u0430\u0434\u0430\u0447.<\/p>\n<\/li>\n<li>\n<p>Flink \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u0434\u043b\u044f streaming ingestion.<\/p>\n<\/li>\n<li>\n<p><code>MERGE INTO<\/code> \u0438 Row Lineage \u0432 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u0435 \u043f\u043e\u043c\u0435\u0447\u0435\u043d\u044b \u043a\u0430\u043a experimental.<\/p>\n<\/li>\n<li>\n<p>Production adoption \u0442\u0440\u0435\u0431\u0443\u0435\u0442 POC \u043d\u0430 \u0441\u0432\u043e\u0451\u043c catalog, storage, concurrency pattern \u0438 workload.<\/p>\n<\/li>\n<\/ul>\n<p>\u0415\u0441\u043b\u0438 \u043a\u043e\u0440\u043e\u0442\u043a\u043e: Iceberg V3 \u0434\u0435\u043b\u0430\u0435\u0442 DML \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043d\u043e \u0431\u043e\u043b\u0435\u0435 \u0437\u0434\u043e\u0440\u043e\u0432\u044b\u043c, \u0430 Doris 4.1 \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e\u0442 DML \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c \u0438\u0437 \u0442\u043e\u0433\u043e \u0436\u0435 SQL-\u0434\u0432\u0438\u0436\u043a\u0430, \u0433\u0434\u0435 \u0432\u044b \u0443\u0436\u0435 \u043d\u0430\u0448\u043b\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443.<\/p>\n<p>\u0414\u043b\u044f data engineer\u2019\u0430 \u044d\u0442\u043e \u043d\u0435 \u0437\u0432\u0443\u0447\u0438\u0442 \u043a\u0430\u043a \u0440\u0435\u0432\u043e\u043b\u044e\u0446\u0438\u044f. \u042d\u0442\u043e \u0437\u0432\u0443\u0447\u0438\u0442 \u043a\u0430\u043a \u043c\u0438\u043d\u0443\u0441 \u043e\u0434\u0438\u043d ticket, \u043c\u0438\u043d\u0443\u0441 \u043e\u0434\u0438\u043d job, \u043c\u0438\u043d\u0443\u0441 \u043e\u0434\u0438\u043d context switch.<\/p>\n<p>\u0410 \u0438\u043d\u043e\u0433\u0434\u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e \u0438 \u0435\u0441\u0442\u044c \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0430\u044f \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c.<\/p>\n<hr\/>\n<h3>\u0421\u0441\u044b\u043b\u043a\u0438<\/h3>\n<ul>\n<li>\n<p><a href=\"https:\/\/morningman.github.io\/posts\/apache-doris-41-iceberg-v3-lakehouse\/\" rel=\"noopener noreferrer nofollow\">\u041e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f Mingyu Chen (Rayner)<\/a> \u2014 CC BY 4.0<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/iceberg.apache.org\/spec\/\" rel=\"noopener noreferrer nofollow\">Apache Iceberg V3 specification<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/iceberg.apache.org\/puffin-spec\/\" rel=\"noopener noreferrer nofollow\">Puffin file format specification<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/doris.apache.org\/docs\/lakehouse\/catalogs\/iceberg-catalog\" rel=\"noopener noreferrer nofollow\">Apache Doris Iceberg catalog docs<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/doris.apache.org\/download\" rel=\"noopener noreferrer nofollow\">Apache Doris download<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/github.com\/apache\/doris\" rel=\"noopener noreferrer nofollow\">Apache Doris on GitHub<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/datalakehouse.kz\/\" rel=\"noopener noreferrer nofollow\">Datanomix.pro \u041f\u0430\u0440\u0442\u043d\u0435\u0440 Apache Doris \/ VeloDB \u0432 \u041a\u0430\u0437\u0430\u0445\u0441\u0442\u0430\u043d\u0435 \u0438 \u0423\u0437\u0431\u0435\u043a\u0438\u0441\u0442\u0430\u043d\u0435<\/a><\/p>\n<\/li>\n<\/ul>\n<hr\/>\n<p><em>\u041e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u043f\u043e \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u0438 CC BY 4.0 \u00a9 2026 Mingyu Chen (Rayner).<\/em><\/p>\n<\/div>\n<p>\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/1030676\/\">https:\/\/habr.com\/ru\/articles\/1030676\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0410\u0442\u0440\u0438\u0431\u0443\u0446\u0438\u044f: \u042d\u0442\u043e\u0442 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u043e\u043c \u0438 \u0430\u0434\u0430\u043f\u0442\u0430\u0446\u0438\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 Apache Doris 4.1 on Iceberg V3: Running the Full Lakehouse Lifecycle from One SQL Engine \u0437\u0430 \u0430\u0432\u0442\u043e\u0440\u0441\u0442\u0432\u043e\u043c Mingyu Chen (Rayner), \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u043f\u043e \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u0438 CC BY 4.0. \u0410\u0434\u0430\u043f\u0442\u0430\u0446\u0438\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430 \u0434\u043b\u044f \u0440\u0443\u0441\u0441\u043a\u043e\u044f\u0437\u044b\u0447\u043d\u043e\u0439 \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0438\u0438 \u0425\u0430\u0431\u0440\u0430 \u0441 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043e\u043c \u043f\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043d\u044b\u043c \u043a\u043e\u043c\u043f\u0440\u043e\u043c\u0438\u0441\u0441\u0430\u043c.\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043f\u0440\u043e Iceberg V3 \u0438 Apache Doris 4.1. \u041d\u043e \u043d\u0435 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u00ab\u0443 \u043d\u0430\u0441 \u0442\u0435\u043f\u0435\u0440\u044c \u0435\u0441\u0442\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u043d\u043e\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0444\u043e\u0440\u043c\u0430\u0442\u0430, \u0445\u043b\u043e\u043f\u0430\u0435\u043c \u0432 \u043b\u0430\u0434\u043e\u0448\u0438\u00bb. \u0413\u043e\u0440\u0430\u0437\u0434\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0435\u0435 \u0434\u0440\u0443\u0433\u043e\u0439 \u0432\u043e\u043f\u0440\u043e\u0441: \u0447\u0442\u043e \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f, \u043a\u043e\u0433\u0434\u0430 SQL-\u0434\u0432\u0438\u0436\u043e\u043a \u0443\u043c\u0435\u0435\u0442 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0438\u0442\u0430\u0442\u044c Iceberg-\u0442\u0430\u0431\u043b\u0438\u0446\u0443, \u043d\u043e \u0438 \u0434\u0435\u043b\u0430\u0442\u044c \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0435 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f, reconciliation, maintenance \u0438 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0443 \u0431\u0435\u0437 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e Spark-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0435 \u0442\u0435\u043b\u043e\u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435?\u0421\u043f\u043e\u0439\u043b\u0435\u0440: Spark \u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u043e\u0442\u043c\u0435\u043d\u044f\u043b. Flink \u0442\u043e\u0436\u0435. \u041d\u043e \u0435\u0441\u0442\u044c \u0446\u0435\u043b\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0435\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b, \u0433\u0434\u0435 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0434\u0432\u0438\u0436\u043a\u0430 \u0434\u043e\u0440\u043e\u0436\u0435 \u0441\u0430\u043c\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438.\u0427\u0442\u043e \u0432\u044b \u0443\u0437\u043d\u0430\u0435\u0442\u0435 \u0438\u0437 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438UPDATE \u043d\u0430 Iceberg \u0431\u0435\u0437 Spark job. Doris 4.1 \u0434\u0435\u043b\u0430\u0435\u0442 UPDATE, DELETE, MERGE INTO \u043d\u0430 Iceberg-\u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445 \u0438\u0437 \u0442\u043e\u0433\u043e \u0436\u0435 SQL-\u043a\u043b\u0438\u0435\u043d\u0442\u0430, \u0433\u0434\u0435 \u0432\u044b \u0443\u0436\u0435 \u043d\u0430\u0448\u043b\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443. \u0426\u0438\u043a\u043b \u00abquery \u2192 fix \u2192 verify\u00bb \u0441\u0436\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u0441 14 \u0447\u0430\u0441\u043e\u0432 \u0434\u043e \u043c\u0438\u043d\u0443\u0442.Deletion Vectors \u0432\u043c\u0435\u0441\u0442\u043e Position Delete files. \u0412 Iceberg V3 DML \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043a\u043e\u043f\u0438\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 parquet delete files \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c commit. \u041e\u0434\u0438\u043d Puffin bitmap \u0432\u043c\u0435\u0441\u0442\u043e 320 \u0444\u0430\u0439\u043b\u043e\u0432. Query latency \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u0451\u0442 \u0434\u0435\u0433\u0440\u0430\u0434\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441 \u0440\u043e\u0441\u0442\u043e\u043c delete ratio (\u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a: 2\u20133x \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435).Row Lineage \u043a\u0430\u043a CDC watermark. _last_updated_sequence_number \u0434\u0432\u0438\u0433\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c DML, \u0430 \u043d\u0435 \u043f\u0440\u0438 compaction. Downstream \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043f\u0435\u0440\u0435\u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0438 \u043f\u043e\u0441\u043b\u0435 rewrite_data_files. \u041e\u0434\u0438\u043d integer watermark \u0432\u043c\u0435\u0441\u0442\u043e snapshot diff.Doris \u043d\u0435 \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u0442 Spark. Heavy ETL, backfills \u0438 streaming ingestion \u043e\u0441\u0442\u0430\u044e\u0442\u0441\u044f \u0437\u0430 Spark\/Flink. Doris \u0437\u0430\u0431\u0438\u0440\u0430\u0435\u0442 adjacent workflow: small DML, incremental reconciliation, maintenance \u0438 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0443.\u0425\u043e\u0442\u0438\u0442\u0435 \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c? \u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u0435 \u0432 \u0427\u0430\u0441\u0442\u044c 8: Quick Start \u0442\u0430\u043c \u043f\u0443\u0442\u044c \u043e\u0442 \u043d\u0443\u043b\u044f \u0434\u043e V3-\u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0437\u0430 \u043f\u044f\u0442\u044c \u043c\u0438\u043d\u0443\u0442.\u0427\u0430\u0441\u0442\u044c 1: 3 \u0447\u0430\u0441\u0430 \u043d\u043e\u0447\u0438, \u043e\u0434\u043d\u0430 \u0441\u0442\u0440\u043e\u043a\u0430 \u0441\u043b\u043e\u043c\u0430\u043d\u0430\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0443\u044e \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e.Data engineer \u0432 e-commerce \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0441\u0438\u0434\u0438\u0442 \u0432 Doris \u0438 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u0442 Iceberg-\u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0441 \u0437\u0430\u043a\u0430\u0437\u0430\u043c\u0438. \u0412\u0438\u0434\u0438\u0442, \u0447\u0442\u043e \u0432\u0447\u0435\u0440\u0430\u0448\u043d\u0438\u0439 batch \u0438\u0437 ERP \u043f\u0440\u043e\u0441\u0442\u0430\u0432\u0438\u043b status = &#8216;cancelled&#8217; \u0434\u043b\u044f 200 \u0437\u0430\u043a\u0430\u0437\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0431\u044b\u043b\u0438 \u043e\u043f\u043b\u0430\u0447\u0435\u043d\u044b \u2014 upstream-\u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043a\u0440\u0438\u0432\u043e\u0439 snapshot. \u0417\u0430\u043f\u0440\u043e\u0441 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442: \u0432\u043e\u0442 \u043e\u043d\u0438, 200 \u0441\u0442\u0440\u043e\u043a \u0441 \u043d\u0435\u0432\u0435\u0440\u043d\u044b\u043c \u0441\u0442\u0430\u0442\u0443\u0441\u043e\u043c. \u0418\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 &#8212; \u0431\u0430\u043d\u0430\u043b\u044c\u043d\u044b\u0439 WHERE order_id IN (&#8230;) \u0438 SET status = &#8216;paid&#8217;.\u0412 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u043c\u0438\u0440\u0435 \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:UPDATE orders_icebergSET status = &#8216;paid&#8217;WHERE order_id IN (SELECT order_id FROM bad_batch_ids);\u0427\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0434\u0430\u043b\u044c\u0448\u0435 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u043c\u0438\u0440\u0435 \u2014 \u043a\u0440\u0430\u0441\u0438\u0432\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0432 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 Mingyu Chen. \u0418\u043d\u0436\u0435\u043d\u0435\u0440 \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u0435\u0442 SQL-\u043a\u043b\u0438\u0435\u043d\u0442 \u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0434\u0440\u0443\u0433\u043e\u0439 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441:\u041f\u0438\u0448\u0435\u0442 Spark job.\u041f\u043e\u0434\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442 scheduler.\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442 PR.\u0416\u0434\u0451\u0442 review.\u0427\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u2014 \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442 \u0437\u0430\u0434\u0430\u0447\u0443 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u0435, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0443 \u043d\u0435\u0433\u043e \u043d\u0435\u0442 \u043f\u0440\u044f\u043c\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a write-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0443.\u0423\u0442\u0440\u043e\u043c \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432 Doris \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442, \u0447\u0442\u043e \u0432\u0441\u0451 \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e.\u041f\u043e\u043b\u043d\u044b\u0439 \u0446\u0438\u043a\u043b \u2014 14 \u0447\u0430\u0441\u043e\u0432. \u041a\u043e\u0434 \u043f\u043e \u0441\u043c\u044b\u0441\u043b\u0443 \u2014 \u043e\u0434\u0438\u043d UPDATE.\u0415\u0441\u0442\u044c \u0438 \u043c\u0435\u043d\u0435\u0435 \u0434\u0440\u0430\u043c\u0430\u0442\u0438\u0447\u043d\u044b\u0439, \u043d\u043e \u0431\u043e\u043b\u0435\u0435 \u0447\u0430\u0441\u0442\u044b\u0439 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439. CDC-\u043f\u043e\u0442\u043e\u043a \u043f\u0438\u0448\u0435\u0442 \u0432 Iceberg, small files \u0438 delete files \u043a\u043e\u043f\u044f\u0442\u0441\u044f, \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u0434\u0435\u0433\u0440\u0430\u0434\u0438\u0440\u0443\u044e\u0442. \u0412\u0441\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u044e\u0442, \u0447\u0442\u043e \u043d\u0443\u0436\u0435\u043d rewrite_data_files.\u0412 \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u0445 \u0441 self-service \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439 \u0438\u043d\u0436\u0435\u043d\u0435\u0440 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442 compaction \u0441\u0430\u043c. \u041d\u043e \u0432\u043e \u043c\u043d\u043e\u0433\u0438\u0445 \u0441\u0440\u0435\u0434\u043d\u0438\u0445 \u0438 \u043a\u0440\u0443\u043f\u043d\u044b\u0445 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u044f\u0445 write-\u0434\u043e\u0441\u0442\u0443\u043f \u043a Iceberg-\u0442\u0430\u0431\u043b\u0438\u0446\u0430\u043c \u0436\u0438\u0432\u0451\u0442 \u0443 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 platform team \u2014 \u0438 \u0442\u043e\u0433\u0434\u0430 \u0437\u0430\u0434\u0430\u0447\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e \u0441\u0443\u0442\u0438 \u043e\u0434\u0438\u043d SQL-\u0432\u044b\u0437\u043e\u0432, \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432 ticket, maintenance window \u0438 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0435. \u0418\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e\u0442 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043f\u0430\u0442\u0442\u0435\u0440\u043d \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0430\u0432\u0442\u043e\u0440 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438, \u0438 \u043e\u043d \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442\u0441\u044f \u0447\u0430\u0449\u0435, \u0447\u0435\u043c \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b.Iceberg \u0440\u0435\u0448\u0438\u043b \u043e\u0433\u0440\u043e\u043c\u043d\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b: \u043e\u043d \u0441\u0434\u0435\u043b\u0430\u043b \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c transactional-\u0444\u043e\u0440\u043c\u0430\u0442\u043e\u043c \u043f\u043e\u0432\u0435\u0440\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0432 object storage. \u041d\u043e \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u044d\u0442\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435\u0439 \u0447\u0430\u0441\u0442\u043e \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u043d\u0435 \u0442\u0430\u043a\u043e\u0439 \u0443\u0436 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u0439:\u0447\u0438\u0442\u0430\u0435\u043c \u0432 \u043e\u0434\u043d\u043e\u043c \u0434\u0432\u0438\u0436\u043a\u0435;\u043f\u0438\u0448\u0435\u043c \u0432 \u0434\u0440\u0443\u0433\u043e\u043c;compaction \u0438 maintenance \u0434\u0435\u043b\u0430\u0435\u043c \u0447\u0435\u0440\u0435\u0437 \u0442\u0440\u0435\u0442\u0438\u0439;CDC \u0438 streaming ingestion \u0436\u0438\u0432\u0443\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e.\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0434\u0432\u0430 \u043d\u0430\u043b\u043e\u0433\u0430 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0435 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435: switch-engine tax \u0438 cross-team tax. Apache Doris 4.1 \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u043e\u0431\u0430.\u0427\u0430\u0441\u0442\u044c 2: \u0413\u0434\u0435 Doris \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 Iceberg-\u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u0435\u0412\u0430\u0436\u043d\u043e \u0441\u0440\u0430\u0437\u0443 \u0441\u043d\u044f\u0442\u044c \u043b\u0438\u0448\u043d\u0435\u0435 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0435: Doris \u043d\u0435 \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c Spark \u0432\u043e \u0432\u0441\u0435\u0445 \u0437\u0430\u0434\u0430\u0447\u0430\u0445.Apache Doris \u2014 \u044d\u0442\u043e MPP SQL engine, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0447\u0438\u043d\u0430\u043b \u043a\u0430\u043a data warehouse, \u0430 \u0437\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0434\u0432\u0430 \u043c\u0430\u0436\u043e\u0440\u043d\u044b\u0445 \u0440\u0435\u043b\u0438\u0437\u0430 \u0441\u043c\u0435\u0441\u0442\u0438\u043b \u0446\u0435\u043d\u0442\u0440 \u0442\u044f\u0436\u0435\u0441\u0442\u0438 \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 lakehouse workloads. Spark \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u0434\u043b\u044f cross-source backfills, \u0442\u044f\u0436\u0451\u043b\u043e\u0433\u043e ETL, \u0431\u043e\u043b\u044c\u0448\u0438\u0445 batch-job\u2019\u043e\u0432 \u0438 \u0448\u0438\u0440\u043e\u043a\u043e\u0439 batch\/streaming-\u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u044b. Flink \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u0432\u044b\u0431\u043e\u0440\u043e\u043c \u0434\u043b\u044f streaming ingestion \u0438 continuous CDC write paths.\u0420\u043e\u043b\u044c Doris \u0432 \u044d\u0442\u043e\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u0443\u0437\u043a\u0430\u044f \u0438 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0430\u044f: real-time query layer \u0434\u043b\u044f Iceberg, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u0437\u0430\u0431\u0438\u0440\u0430\u0435\u0442 \u0441\u043e\u0441\u0435\u0434\u043d\u0438\u0439 workflow:\u0432\u044b \u0443\u0436\u0435 \u043f\u0440\u0438\u0448\u043b\u0438 \u0432 SQL-\u043a\u043b\u0438\u0435\u043d\u0442 \u0441 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c;\u0443\u0432\u0438\u0434\u0435\u043b\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0438\u043b\u0438 \u0440\u0430\u0441\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435;\u0445\u043e\u0442\u0438\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435;\u0445\u043e\u0442\u0438\u0442\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c incremental reconciliation;\u0445\u043e\u0442\u0438\u0442\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c maintenance \u0438\u043b\u0438 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0443;\u043d\u0435 \u0445\u043e\u0442\u0438\u0442\u0435 \u0440\u0430\u0434\u0438 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u044b\u0433\u0430\u0442\u044c \u0432 \u0434\u0440\u0443\u0433\u043e\u0439 \u043a\u043b\u0430\u0441\u0442\u0435\u0440.\u0412 Doris 4.1 \u043c\u0430\u0442\u0440\u0438\u0446\u0430 Iceberg-\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0448\u0438\u0440\u043e\u043a\u043e:\u0417\u043e\u043d\u0430\u0427\u0442\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044fReadV1\/V2\/V3, time travel, branch\/tag, views, system tables, Position\/Equality\/DV deleteWriteINSERT, OVERWRITE, CTAS, INSERT INTO BRANCH, DELETE, UPDATE, MERGE INTODDLcreate\/drop table, schema change, partition evolution, branch\/tag managementMaintainrewrite_data_files, expire_snapshots, rewrite_manifests, rollback, fast_forwardDiagnosedata file distribution, dangling deleteApache Doris 4.1 &amp; Iceberg V3 Lakehouse Lifecycle\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430: \u043e\u0434\u0438\u043d SQL-\u0434\u0432\u0438\u0436\u043e\u043a \u0434\u043b\u044f Read, Write, DDL, Maintenance \u0438 Diagnostics \u043d\u0430 Iceberg V3 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445. \u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a: \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f Mingyu Chen. \u041d\u043e \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043d\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u043d\u0435 \u0432\u0441\u044f \u043c\u0430\u0442\u0440\u0438\u0446\u0430. \u0424\u043e\u043a\u0443\u0441 \u043d\u0430 \u0434\u0432\u0443\u0445 \u0432\u0435\u0449\u0430\u0445:DML completeness: UPDATE, DELETE, MERGE INTO \u043f\u0440\u044f\u043c\u043e \u0438\u0437 SQL-\u043a\u043b\u0438\u0435\u043d\u0442\u0430.Iceberg V3 mechanics: Deletion Vectors \u0438 Row Lineage, \u0431\u0435\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 DML \u0431\u044b\u0441\u0442\u0440\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u043a\u043e\u043f\u0438\u0442\u044c \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0434\u043e\u043b\u0433.\u0427\u0430\u0441\u0442\u044c 3: DML \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432 query layer\u041d\u0430\u0447\u043d\u0451\u043c \u0441 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e.\u0418\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043e\u0434\u043d\u0443 \u0441\u0442\u0440\u043e\u043a\u0443:UPDATE iceberg_tblSET name = &#8216;Alice-fixed&#8217;WHERE id = 1;\u041e\u0442\u043a\u0430\u0442\u0438\u0442\u044c \u043f\u043b\u043e\u0445\u043e\u0439 batch:DELETE FROM iceberg_tblWHERE dt = &#8216;2026-04-01&#8217;  AND source = &#8216;bad_pipeline&#8217;;\u0421\u0434\u0435\u043b\u0430\u0442\u044c upsert \u043f\u043e incremental batch:MERGE INTO iceberg_tbl tUSING (    SELECT 1 AS id, &#8216;Alice_new&#8217; AS name, 26 AS age, &#8216;U&#8217; AS flag    UNION ALL SELECT 2, &#8216;Bob&#8217;,  30, &#8216;D&#8217;    UNION ALL SELECT 4, &#8216;Dora&#8217;, 28, &#8216;I&#8217;) sON t.id = s.idWHEN MATCHED AND s.flag = &#8216;D&#8217; THEN DELETEWHEN MATCHED THEN UPDATE SET name = s.name, age = s.ageWHEN NOT MATCHED THEN INSERT (id, name, age) VALUES (s.id, s.name, s.age);MERGE INTO \u0437\u0434\u0435\u0441\u044c \u0441\u0430\u043c\u0430\u044f \u0432\u0430\u0436\u043d\u0430\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f. \u0418\u043c\u0435\u043d\u043d\u043e \u043d\u0430 \u043d\u0435\u0439 \u0434\u0435\u0440\u0436\u0430\u0442\u0441\u044f \u0442\u0438\u043f\u0438\u0447\u043d\u044b\u0435 CDC\/upsert-\u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438:\u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0438\u0437 PostgreSQL \u0438\u043b\u0438 MySQL \u043f\u0440\u0438\u043b\u0435\u0442\u0430\u044e\u0442 \u0447\u0435\u0440\u0435\u0437 Flink CDC \u0438\u043b\u0438 \u043f\u043e\u0445\u043e\u0436\u0438\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442;downstream Iceberg-\u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u043f\u0440\u0438\u043d\u044f\u0442\u044c inserts, updates \u0438 deletes \u0432\u043c\u0435\u0441\u0442\u0435;incremental materialized views \u0434\u043e\u043b\u0436\u043d\u044b \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c wide tables \u043f\u043e change key.\u0411\u0435\u0437 MERGE INTO \u0432\u044b \u043b\u0438\u0431\u043e \u043f\u0435\u0440\u0435\u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0446\u0435\u043b\u0438\u043a\u043e\u043c, \u043b\u0438\u0431\u043e \u0443\u043d\u043e\u0441\u0438\u0442\u0435 \u043b\u043e\u0433\u0438\u043a\u0443 \u0432 Spark\/Flink \u0438 \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u0435\u0442\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 pipeline.\u0412 Doris 4.1 MERGE INTO \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 partitioned targets, subqueries \u043a\u0430\u043a source \u0438 expressions \u0432 UPDATE-\u0447\u0430\u0441\u0442\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 age = age * 2 + 1.\u041d\u043e caveat \u0441\u0440\u0430\u0437\u0443: target table \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c format-version &gt;= 2, \u0430 \u0441\u0430\u043c MERGE INTO \u0432 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u043e\u043c\u0435\u0447\u0435\u043d \u043a\u0430\u043a experimental. \u042d\u0442\u043e \u043d\u0435 \u00ab\u0441\u0440\u0430\u0437\u0443 \u043a\u0430\u0442\u0438\u043c \u0432 \u043f\u0440\u043e\u0434 \u0432 \u043f\u044f\u0442\u043d\u0438\u0446\u0443 \u0432\u0435\u0447\u0435\u0440\u043e\u043c\u00bb, \u0430 \u00ab\u0434\u0435\u043b\u0430\u0435\u043c POC \u043d\u0430 \u0441\u0432\u043e\u0451\u043c workload\u00bb.\u0427\u0430\u0441\u0442\u044c 4: \u041f\u043e\u0447\u0435\u043c\u0443 DML \u0431\u0435\u0437 V3 \u0431\u044b\u0441\u0442\u0440\u043e \u043a\u043e\u043f\u0438\u0442 \u0434\u043e\u043b\u0433\u0438\u041c\u043e\u0436\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0440\u0430\u0437 Doris \u0442\u0435\u043f\u0435\u0440\u044c \u0443\u043c\u0435\u0435\u0442 UPDATE, DELETE, MERGE INTO \u043d\u0430 Iceberg \u2014 \u0437\u0430\u0434\u0430\u0447\u0430 \u0440\u0435\u0448\u0435\u043d\u0430.\u041d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c. \u041d\u0430\u043b\u0438\u0447\u0438\u0435 DML \u2014 \u044d\u0442\u043e \u0435\u0449\u0451 \u043d\u0435 \u0445\u043e\u0440\u043e\u0448\u0438\u0439 DML.\u0412 Iceberg V2 \u043a\u0430\u0436\u0434\u0430\u044f \u0442\u0430\u043a\u0430\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u0441\u043e\u0437\u0434\u0430\u0451\u0442 Position Delete file. \u042d\u0442\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 parquet-\u0444\u0430\u0439\u043b, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u043e: \u00ab\u0432\u043e\u0442 \u044d\u0442\u0438 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u0438\u0437 data file \u043d\u0443\u0436\u043d\u043e \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0443\u0434\u0430\u043b\u0451\u043d\u043d\u044b\u043c\u0438\u00bb. \u0427\u0442\u043e\u0431\u044b \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, reader \u0432\u044b\u043d\u0443\u0436\u0434\u0435\u043d \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c anti-join: \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c data files, \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432\u0441\u0435 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 delete files, \u043e\u0442\u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043c\u0435\u0447\u0435\u043d\u043d\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438.\u041e\u0434\u0438\u043d delete file \u2014 \u043d\u0438\u0447\u0435\u0433\u043e \u0441\u0442\u0440\u0430\u0448\u043d\u043e\u0433\u043e. \u0414\u0435\u0441\u044f\u0442\u044c \u2014 \u0442\u0435\u0440\u043f\u0438\u043c\u043e. \u0421\u043e\u0442\u043d\u0438 \u0438 \u0442\u044b\u0441\u044f\u0447\u0438 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0445 DML commits \u0432 CDC-\u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u2014 \u0443\u0436\u0435 \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u043e.\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0440\u0430\u0441\u0442\u0451\u0442 \u043b\u0438\u043d\u0435\u0439\u043d\u043e:\u043a\u0430\u0436\u0434\u044b\u0439 DML commit \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u043e\u0432\u044b\u0435 delete files;\u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 query \u0432\u044b\u043d\u0443\u0436\u0434\u0435\u043d \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0442\u044c \u0438 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0442\u044c \u0432\u0441\u0435 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u044b\u0435 delete files;\u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0443\u0436\u0435\u043d rewrite_data_files, \u0447\u0442\u043e\u0431\u044b \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0432 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435;\u0430 \u0437\u043d\u0430\u0447\u0438\u0442, \u0441\u043d\u043e\u0432\u0430 maintenance job, scheduler \u0438 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u2014 \u0442\u043e\u0442 \u0441\u0430\u043c\u044b\u0439 Jira-ticket \u0438\u0437 \u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u0442\u0430\u0442\u044c\u0438.\u042d\u0442\u043e \u043f\u0435\u0440\u0432\u044b\u0439 \u0434\u043e\u043b\u0433: performance debt. DML \u0432\u0440\u043e\u0434\u0435 \u0435\u0441\u0442\u044c, \u043d\u043e \u043a\u0430\u0436\u0434\u044b\u0439 commit \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e \u0443\u0445\u0443\u0434\u0448\u0430\u0435\u0442 \u0447\u0442\u0435\u043d\u0438\u0435.\u0415\u0441\u0442\u044c \u0432\u0442\u043e\u0440\u043e\u0439 \u0434\u043e\u043b\u0433: observability debt. \u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a commit \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u0451\u043b, downstream-\u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u0437\u043d\u0430\u044e\u0442, \u043a\u043e\u0433\u0434\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u0431\u044b\u043b\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0440\u0430\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0430. \u041e\u043d\u0438 \u043f\u043e\u043b\u0430\u0433\u0430\u044e\u0442\u0441\u044f \u043d\u0430 snapshot diff. \u041d\u043e compaction \u0438 rewrite_data_files \u0442\u043e\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u044e\u0442 \u043d\u043e\u0432\u044b\u0435 snapshots, \u0445\u043e\u0442\u044f \u0434\u0430\u043d\u043d\u044b\u0435 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435 \u043c\u0435\u043d\u044f\u043b\u0438\u0441\u044c.\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 downstream pipeline \u0432\u0438\u0434\u0438\u0442 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0439 rewrite \u0438 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u0443\u0435\u0442 \u0435\u0433\u043e \u043a\u0430\u043a \u043d\u043e\u0432\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u2014 \u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u043f\u0435\u0440\u0435\u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u0442\u0440\u043e\u0433\u0430\u043b.\u0415\u0441\u043b\u0438 \u043a\u043e\u0440\u043e\u0442\u043a\u043e:DML \u0431\u0435\u0437 V3 \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432 \u0434\u0432\u0430 \u0434\u043e\u043b\u0433\u0430: performance debt \u0438 observability debt.Iceberg V3 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u043d\u0430 \u043d\u0438\u0445 \u0434\u0432\u0443\u043c\u044f \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430\u043c\u0438:Deletion Vectors \u2014 \u0447\u0442\u043e\u0431\u044b DML \u043d\u0435 \u0440\u0430\u0437\u0434\u0443\u0432\u0430\u043b delete files.Row Lineage \u2014 \u0447\u0442\u043e\u0431\u044b row-level changes \u0431\u044b\u043b\u0438 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c\u044b\u043c\u0438.\u0427\u0430\u0441\u0442\u044c 5: Deletion Vectors \u2014 \u043c\u0435\u043d\u044c\u0448\u0435 delete files, \u043c\u0435\u043d\u044c\u0448\u0435 anti-joinDeletion Vector \u2014 \u044d\u0442\u043e bitmap, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0445\u0440\u0430\u043d\u0438\u0442, \u043a\u0430\u043a\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 data file \u0441\u0447\u0438\u0442\u0430\u044e\u0442\u0441\u044f \u0443\u0434\u0430\u043b\u0451\u043d\u043d\u044b\u043c\u0438. \u0412 Iceberg V3 \u043e\u043d \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 Puffin file format.\u041a\u043e\u043d\u0442\u0440\u0430\u0441\u0442 \u0441 V2 \u0442\u0430\u043a\u043e\u0439:V2: \u043a\u0430\u0436\u0434\u044b\u0439 DML commit \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 Position Delete parquet.V3: \u0432\u0441\u0435 \u043f\u043e\u043c\u0435\u0442\u043a\u0438 \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e data file \u0441\u0445\u043b\u043e\u043f\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u043e\u0434\u0438\u043d Puffin Deletion Vector.V2 reader: \u0447\u0438\u0442\u0430\u0435\u0442 data file, \u043f\u043e\u0442\u043e\u043c anti-join \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u043c\u0438 delete files.V3 reader: \u0447\u0438\u0442\u0430\u0435\u0442 data file + DV \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442 bitmap \u0437\u0430 \u043e\u0434\u0438\u043d \u043f\u0440\u043e\u0445\u043e\u0434. Anti-join \u0438\u0441\u0447\u0435\u0437\u0430\u0435\u0442.Iceberg V2 Position Deletes vs V3 Deletion VectorV2 \u043a\u043e\u043f\u0438\u0442 Position Delete parquet-\u0444\u0430\u0439\u043b\u044b \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c DML commit. V3 \u0441\u0445\u043b\u043e\u043f\u044b\u0432\u0430\u0435\u0442 \u0432\u0441\u0435 \u043f\u043e\u043c\u0435\u0442\u043a\u0438 \u0432 \u043e\u0434\u0438\u043d Puffin Deletion Vector. \u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a: \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f Mingyu Chen. \u041c\u0438\u043d\u0438-\u043f\u0440\u0438\u043c\u0435\u0440 V2:CREATE TABLE orders_v2 (    id INT,    status STRING,    amount DECIMAL(10,2)) PROPERTIES (&#8216;format-version&#8217; = &#8216;2&#8217;);INSERT INTO orders_v2 VALUES    (1, &#8216;pending&#8217;, 100),    (2, &#8216;pending&#8217;, 200),    (3, &#8216;pending&#8217;, 300);UPDATE orders_v2 SET status = &#8216;shipped&#8217; WHERE id = 1;UPDATE orders_v2 SET status = &#8216;shipped&#8217;&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-478318","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/478318","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=478318"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/478318\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=478318"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=478318"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=478318"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}