forked from duckdb/duckdb-delta
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8a7721e
commit 4a32608
Showing
5 changed files
with
167 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
# name: test/sql/generated/attach_parallel.test | ||
# description: Test attaching a delta table and reading from it in parallel | ||
# group: [dat] | ||
|
||
require parquet | ||
|
||
require delta | ||
|
||
require-env GENERATED_DATA_AVAILABLE | ||
|
||
statement ok | ||
pragma threads=10; | ||
|
||
statement ok | ||
ATTACH 'data/generated/simple_partitioned/delta_lake/' as dt (TYPE delta) | ||
|
||
statement ok | ||
ATTACH 'data/generated/simple_partitioned/delta_lake/' as dt_pinned (TYPE delta, PIN_SNAPSHOT) | ||
|
||
concurrentloop threadid 0 20 | ||
|
||
query I | ||
WITH RECURSIVE ctename AS ( | ||
SELECT *, 1 as recursiondepth | ||
FROM dt | ||
UNION ALL | ||
SELECT * EXCLUDE (c2.recursiondepth), c2.recursiondepth + 1 as recursiondepth | ||
FROM ctename as c2 | ||
WHERE c2.recursiondepth < 8 | ||
) | ||
SELECT count(i) FROM ctename; | ||
---- | ||
80 | ||
|
||
query I | ||
WITH RECURSIVE ctename AS ( | ||
SELECT *, 1 as recursiondepth | ||
FROM dt_pinned | ||
UNION ALL | ||
SELECT * EXCLUDE (c2.recursiondepth), c2.recursiondepth + 1 as recursiondepth | ||
FROM ctename as c2 | ||
WHERE c2.recursiondepth < 8 | ||
) | ||
SELECT count(i) FROM ctename; | ||
---- | ||
80 | ||
|
||
endloop | ||
|
||
concurrentloop threadid 0 20 | ||
|
||
query I | ||
SELECT count(i) FROM dt UNION ALL | ||
SELECT count(i) FROM dt UNION ALL | ||
SELECT count(i) FROM dt UNION ALL | ||
SELECT count(i) FROM dt UNION ALL | ||
SELECT count(i) FROM dt UNION ALL | ||
SELECT count(i) FROM dt UNION ALL | ||
SELECT count(i) FROM dt UNION ALL | ||
SELECT count(i) FROM dt UNION ALL | ||
SELECT count(i) FROM dt UNION ALL | ||
SELECT count(i) FROM dt | ||
---- | ||
10 | ||
10 | ||
10 | ||
10 | ||
10 | ||
10 | ||
10 | ||
10 | ||
10 | ||
10 | ||
|
||
query I | ||
SELECT count(i) FROM dt_pinned UNION ALL | ||
SELECT count(i) FROM dt_pinned UNION ALL | ||
SELECT count(i) FROM dt_pinned UNION ALL | ||
SELECT count(i) FROM dt_pinned UNION ALL | ||
SELECT count(i) FROM dt_pinned UNION ALL | ||
SELECT count(i) FROM dt_pinned UNION ALL | ||
SELECT count(i) FROM dt_pinned UNION ALL | ||
SELECT count(i) FROM dt_pinned UNION ALL | ||
SELECT count(i) FROM dt_pinned UNION ALL | ||
SELECT count(i) FROM dt_pinned | ||
---- | ||
10 | ||
10 | ||
10 | ||
10 | ||
10 | ||
10 | ||
10 | ||
10 | ||
10 | ||
10 | ||
|
||
|
||
|
||
endloop |