File: test_partition_flushing.test_slow

package info (click to toggle)
duckdb 1.5.1-2
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 299,196 kB
  • sloc: cpp: 865,414; ansic: 57,292; python: 18,871; sql: 12,663; lisp: 11,751; yacc: 7,412; lex: 1,682; sh: 747; makefile: 558
file content (34 lines) | stat: -rw-r--r-- 772 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# name: test/sql/window/test_partition_flushing.test_slow
# description: Test chunk flushing under multithreaded partitioning
# group: [window]

statement ok
CREATE  TABLE "data" ("Store" INTEGER, "Dept" INTEGER, "Date" DATE, "Weekly_Sales" DOUBLE, "IsHoliday" BOOLEAN);

statement ok
insert into data select * from read_csv_auto('test/sql/window/walmart.csv.gz');

statement ok
PRAGMA threads=4

query II
SELECT "Store", "Weekly_Sales"
FROM (
	SELECT "Store", "Date", "Weekly_Sales", ROW_NUMBER() OVER (
		PARTITION BY "Store" ORDER BY "Date" DESC, "Dept"
		) r
	FROM data) w
WHERE r = 1
ORDER BY 1
----
1	27390.810000
2	41615.240000
3	11351.240000
4	57046.290000
5	12774.470000
6	30579.350000
7	10983.790000
8	21737.930000
9	20194.310000
10	58409.830000
11	23746.390000