-
Notifications
You must be signed in to change notification settings - Fork 131
Add custom MultiFileReader for reading delete files #674
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: v1.4-andium
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| # name: test/sql/delete/delete_metadata.test | ||
| # description: Test ducklake deletes | ||
| # group: [delete] | ||
|
|
||
| require httpfs | ||
|
|
||
| require-env S3_TEST_SERVER_AVAILABLE 1 | ||
|
|
||
| test-env DUCKLAKE_CONNECTION __TEST_DIR__/{UUID}.db | ||
|
|
||
| require ducklake | ||
|
|
||
| require parquet | ||
|
|
||
| statement ok | ||
| ATTACH 'ducklake:${DUCKLAKE_CONNECTION}' AS ducklake (DATA_PATH 's3://mybucket') | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Other small nit This test will still only be executed with minio due to the require-env but could eventually be executed in dfferent scenarios in the future
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes actually we cannot do this because of duckdb/duckdb#20396 - once the 1.4 branch updates its dependency to a more recent duckdb 1.4 tag - we'll be able to do this. |
||
|
|
||
| # Clean up any existing table from previous runs | ||
| statement ok | ||
| DROP TABLE IF EXISTS ducklake.test; | ||
|
|
||
| statement ok | ||
| CREATE TABLE ducklake.test AS SELECT i id FROM range(1000) t(i); | ||
|
|
||
| statement ok | ||
| DELETE FROM ducklake.test WHERE id IN (100, 200, 300); | ||
|
|
||
| # Verify there is 1 delete file | ||
| query I | ||
| SELECT sum(delete_file_count) FROM ducklake_table_info('ducklake') WHERE table_name = 'test'; | ||
| ---- | ||
| 1 | ||
|
|
||
| query II | ||
| EXPLAIN ANALYZE SELECT * FROM ducklake.test | ||
| ---- | ||
| analyzed_plan <REGEX>:.*#HEAD: 0.* | ||
|
|
||
| # we can time travel to see the state of the table before deletes | ||
| query II | ||
| EXPLAIN ANALYZE SELECT * FROM ducklake.test AT (VERSION => 1) | ||
| ---- | ||
| analyzed_plan <REGEX>:.*#HEAD: 0.* | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@samansmink since you are more aware than I am of the effects of S3 files in the multifile reader, can this have any ill effects?