Skip to content

Commit 45b40c7

Browse files
authored
Minor: add "clickbench extended" queries to unit tests (#11763)
1 parent 6e2ff29 commit 45b40c7

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

benchmarks/queries/clickbench/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ ClickBench is focused on aggregation and filtering performance (though it has no
1414

1515
The "extended" queries are not part of the official ClickBench benchmark.
1616
Instead they are used to test other DataFusion features that are not covered by
17-
the standard benchmark Each description below is for the corresponding line in
17+
the standard benchmark. Each description below is for the corresponding line in
1818
`extended.sql` (line 1 is `Q0`, line 2 is `Q1`, etc.)
1919

2020
### Q0: Data Exploration

datafusion/sqllogictest/test_files/clickbench.slt

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,5 +274,23 @@ query PI
274274
SELECT DATE_TRUNC('minute', to_timestamp_seconds("EventTime")) AS M, COUNT(*) AS PageViews FROM hits WHERE "CounterID" = 62 AND "EventDate"::INT::DATE >= '2013-07-14' AND "EventDate"::INT::DATE <= '2013-07-15' AND "IsRefresh" = 0 AND "DontCountHits" = 0 GROUP BY DATE_TRUNC('minute', to_timestamp_seconds("EventTime")) ORDER BY DATE_TRUNC('minute', M) LIMIT 10 OFFSET 1000;
275275
----
276276

277+
# Clickbench "Extended" queries that test count distinct
278+
279+
query III
280+
SELECT COUNT(DISTINCT "SearchPhrase"), COUNT(DISTINCT "MobilePhone"), COUNT(DISTINCT "MobilePhoneModel") FROM hits;
281+
----
282+
1 1 1
283+
284+
query III
285+
SELECT COUNT(DISTINCT "HitColor"), COUNT(DISTINCT "BrowserCountry"), COUNT(DISTINCT "BrowserLanguage") FROM hits;
286+
----
287+
1 1 1
288+
289+
query TIIII
290+
SELECT "BrowserCountry", COUNT(DISTINCT "SocialNetwork"), COUNT(DISTINCT "HitColor"), COUNT(DISTINCT "BrowserLanguage"), COUNT(DISTINCT "SocialAction") FROM hits GROUP BY 1 ORDER BY 2 DESC LIMIT 10;
291+
----
292+
� 1 1 1 1
293+
294+
277295
statement ok
278296
drop table hits;

0 commit comments

Comments
 (0)