ducklake
ducklake copied to clipboard
ATTACH should verify that DATA_PATH is consistent with previous DATA_PATH
Inconsistent results occur if DATA_PATH changes on ATTACH. Instead, it would be better if ATTACH reports the different paths and raises an error.
INSTALL ducklake; LOAD ducklake;
INSTALL sqlite; LOAD sqlite;
ATTACH 'ducklake:sqlite:x3.sqlite' AS x3 (DATA_PATH 'x3.ducklake.files/');
CREATE TABLE IF NOT EXISTS x3.t1 (a int, b int);
INSERT INTO x3.t1 VALUES (9, 10), (11, 12);
SELECT * FROM x3.t1;
DETACH x3;
-- Note that DATA_PATH is different than above.
ATTACH 'ducklake:sqlite:x3.sqlite' AS x3 (DATA_PATH 'x3_different.ducklake.files/');
SELECT * FROM x3.t1;
Results:
...
ATTACH 'ducklake:sqlite:x3.sqlite' AS x3 (DATA_PATH 'x3_different.ducklake.files/');
SELECT * FROM x3.t1;
IO Error:
Cannot open file "x3_different.ducklake.files/main/t1//ducklake-01977c38-0e3e-7cbc-a30c-f67c482e53af.parquet": No such file or directory
This is a feature not a bug and very handy for writing using mounted storage, in my case I use blob fuse to write and abfsd to read , and works perfectly
I think this is implemented via https://github.com/duckdb/ducklake/pull/415, could you check on duckdb 1.4.0 + relevant ducklake? Thanks!
This should already be fixed, feel free to reopen otherwise.