AI / Apache Paimon Interview questions
What is the difference between the Partial Update and Aggregation merge engines?
Both combine multiple records that share a primary key field-by-field, but they combine values very differently:
| Merge engine | Rule per field | Typical use case |
| Partial Update | Non-null incoming values overwrite the existing value; nulls are ignored, preserving the old value. | Assembling one wide row from several source systems that each populate a subset of columns. |
| Aggregation | Each field applies an explicit aggregate function (e.g. sum, max, min, last_value) declared via fields.<field-name>.aggregate-function. | Maintaining running metrics, like a live total order count or maximum observed price. |
-- Partial Update CREATE TABLE dim (pk BIGINT PRIMARY KEY NOT ENFORCED, name STRING, city STRING) WITH ('merge-engine' = 'partial-update'); -- Aggregation CREATE TABLE metrics (pk BIGINT PRIMARY KEY NOT ENFORCED, total_price BIGINT) WITH ( 'merge-engine' = 'aggregation', 'fields.total_price.aggregate-function' = 'sum' );
Partial Update fills in gaps between records; Aggregation combines every record mathematically. Mixing them up on the wrong table either loses data that should have been summed, or double-counts data that should have simply overwritten a stale value.
More Related questions...