v.19.3New Features

Storagejoin Now Supports Join_any_take_last_row Setting That Allows Overwriting Existing Values of the Same Key

StorageJoin now supports join_any_take_last_row setting that allows overwriting existing values of the same key. #3973 (Amos Bird
The StorageJoin engine now supports the join_any_take_last_row setting, which enables overwriting existing values for the same key with the latest row.

Why it matters

This feature addresses the problem of handling duplicate keys in StorageJoin. By allowing the last row for a key to overwrite previous values, it improves data accuracy and flexibility in join operations where later data should take precedence.

How to use it

Users can enable this behavior by setting join_any_take_last_row to true when creating or querying a StorageJoin. For example:

SET join_any_take_last_row = 1;
-- or in the table creation settings
CREATE TABLE join_table ENGINE = Join(settings join_any_take_last_row=1) AS ...