You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ROWID is not described in docu (at least I could not find docu or blog about rowid),
so behaviour described below might be OK while it looks a bit strange.
What I did: I was curious how ROWIDs are calculated by ducklake internals, so I made some tests. I will write my thoughts about ROWIDs somewhere else more broadly, here is brief result, if I:
insert 2 rows into table
delete 1 row
insert 2 more rows into table
delete 1 of last rows
select rowid,*
CALL ducklake_rewrite_data_files (delete_threshold => 0.5 to make rewrite happen)
ROWIDs of BOTH rows of the table are different after CALL ducklake_rewrite_data_files...
Question: is it OK?
If yes then I doubt about ducklake lineage functionality.
If not - there is a bug.
Initially I did a bit more complicated test in which only one ROWID was different after CALL, which make overall picture dizzy.
Full SQL script to reproduce:
ATTACH 'ducklake:dlrowids.ducklake' AS dl;
create table dl.rows1 ( id int );
insert into dl.rows1 values (0), (1);
delete from dl.rows1 where id=0;
insert into dl.rows1 values (2), (3);
delete from dl.rows1 where id=2;
select rowid,* from dl.rows1;
CALL ducklake_rewrite_data_files('dl', delete_threshold => 0.5);
select rowid,* from dl.rows1;
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
ROWID is not described in docu (at least I could not find docu or blog about rowid),
so behaviour described below might be OK while it looks a bit strange.
What I did: I was curious how ROWIDs are calculated by ducklake internals, so I made some tests. I will write my thoughts about ROWIDs somewhere else more broadly, here is brief result, if I:
results of selects differ:
(first select)
┌───────┬───────┐
│ rowid │ id │
│ int64 │ int32 │
├───────┼───────┤
│ 1 │ 1 │
│ 3 │ 3 │
└───────┴───────┘
(call ...)
┌─────────┐
│ Success │
│ boolean │
├─────────┤
│ 0 rows │
└─────────┘
(second select)
┌───────┬───────┐
│ rowid │ id │
│ int64 │ int32 │
├───────┼───────┤
│ 0 │ 1 │
│ 1 │ 3 │
└───────┴───────┘
ROWIDs of BOTH rows of the table are different after CALL ducklake_rewrite_data_files...
Question: is it OK?
If yes then I doubt about ducklake lineage functionality.
If not - there is a bug.
Initially I did a bit more complicated test in which only one ROWID was different after CALL, which make overall picture dizzy.
Full SQL script to reproduce:
ATTACH 'ducklake:dlrowids.ducklake' AS dl;
create table dl.rows1 ( id int );
insert into dl.rows1 values (0), (1);
delete from dl.rows1 where id=0;
insert into dl.rows1 values (2), (3);
delete from dl.rows1 where id=2;
select rowid,* from dl.rows1;
CALL ducklake_rewrite_data_files('dl', delete_threshold => 0.5);
select rowid,* from dl.rows1;
Beta Was this translation helpful? Give feedback.
All reactions