CREATE TABLE `chain_test` (
`t1` BIGINT COMMENT 't1',
`t2` BIGINT COMMENT 't2',
`t3` STRING COMMENT 't3'
) PARTITIONED BY (`dt` STRING, `hr` STRING)
TBLPROPERTIES (
'bucket-key' = 't1',
'primary-key' = 'dt,hr,t1',
'partition.timestamp-pattern' = '$dt $hr:00:00',
'partition.timestamp-formatter' = 'yyyyMMdd HH:mm:ss',
'chain-table.enabled' = 'true',
'bucket' = '1',
'merge-engine' = 'deduplicate',
'sequence.field' = 't2',
'chain-table.chain-partition-keys' = 'dt,hr'
);
INSERT INTO TABLE `my_db1`.`chain_test$branch_snapshot` PARTITION (dt = '20250809', hr='01') VALUES (3, 1, '3');
INSERT INTO TABLE `my_db1`.`chain_test$branch_snapshot` PARTITION (dt = '20250809', hr='02') VALUES (4, 1, '4');
INSERT INTO TABLE `my_db1`.`chain_test$branch_delta` PARTITION (dt = '20250810', hr='03') VALUES (5, 1, '5');
INSERT INTO TABLE `my_db1`.`chain_test$branch_delta` PARTITION (dt = '20250810', hr='05') VALUES (6, 1, '6');
SELECT * FROM `my_db1`.`chain_test` WHERE dt='20250810' AND hr='05';
+---+---+---+--------+---+
| t1| t2| t3| dt| hr|
+---+---+---+--------+---+
| 4| 1| 4|20250810| 05|
| 5| 1| 5|20250810| 05|
| 6| 1| 6|20250810| 05|
+---+---+---+--------+---+
+---+---+---+--------+---+
| t1| t2| t3| dt| hr|
+---+---+---+--------+---+
| 3| 1| 3|20250810| 05|
| 5| 1| 5|20250810| 05|
| 6| 1| 6|20250810| 05|
+---+---+---+--------+---+
Search before asking
Paimon version
master
Compute Engine
spark
Minimal reproduce step
What doesn't meet your expectations?
Expect:
Actual:
Anything else?
No response
Are you willing to submit a PR?