NestDream commented on PR #10089:
URL: https://github.com/apache/paimon/pull/10089#issuecomment-5774126414
Repro without any code change (master 54d8596ce, Flink 1.20.1 MiniCluster,
filesystem catalog):
```sql
CREATE TABLE T (id INT, v STRING, PRIMARY KEY (id) NOT ENFORCED)
WITH ('bucket' = '1', 'write-only' = 'true', 'changelog-producer' = 'input');
INSERT INTO T VALUES (1, 'a');
INSERT INTO T VALUES (2, 'b');
INSERT INTO T VALUES (3, 'c');
CALL sys.expire_snapshots(`table` => 'default.T', retain_min => 0,
older_than => '2030-01-01 00:00:00');
SELECT snapshot_id FROM T$snapshots;
SELECT * FROM T /*+ OPTIONS('incremental-between'='2,3',
'incremental-between-scan-mode'='changelog') */;
```
On master the CALL returns `0`, `T$snapshots` still lists 1, 2, 3, the three
`changelog-*.parquet` files under `bucket-0` are gone, and the last SELECT
fails with `FileNotFoundException: File
'.../default.db/T/bucket-0/changelog-...-0.parquet' not found`. With this PR
the CALL fails with `IllegalArgumentException: retainMin (0) must be at least
1.` and no file is touched. Same with `retain_min => -1`, and `retain_min => 1`
still expires snapshots 1 and 2 as before.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]