Skip to content

docs: add partitioned ClickBench SQL example#23637

Merged
alamb merged 1 commit into
apache:mainfrom
ByteBaker:docs/clickbench-partitioned-sql
Jul 16, 2026
Merged

docs: add partitioned ClickBench SQL example#23637
alamb merged 1 commit into
apache:mainfrom
ByteBaker:docs/clickbench-partitioned-sql

Conversation

@ByteBaker

Copy link
Copy Markdown
Contributor

Continuation of #23315

It would also help (maybe as a follow on PR) to give an explicit example of the SQL required for hits_partitioned

Originally posted by @alamb in #23315 (comment)

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@80bc64f). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #23637   +/-   ##
=======================================
  Coverage        ?   80.65%           
=======================================
  Files           ?     1086           
  Lines           ?   366098           
  Branches        ?   366098           
=======================================
  Hits            ?   295269           
  Misses          ?    53233           
  Partials        ?    17596           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@alamb alamb added the documentation Improvements or additions to documentation label Jul 16, 2026

@alamb alamb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @ByteBaker

Comment thread benchmarks/README.md
LOCATION 'benchmarks/data/hits.parquet';
```

For the partitioned dataset, register the directory and enable

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this locally and it works great

DataFusion CLI v54.0.0
> CREATE EXTERNAL TABLE hits_raw
STORED AS PARQUET
LOCATION 'benchmarks/data/hits_partitioned'
OPTIONS ('binary_as_string' 'true');
0 row(s) fetched.
Elapsed 0.060 seconds.

> CREATE VIEW hits AS
SELECT * EXCEPT ("EventDate"),
       CAST(CAST("EventDate" AS INTEGER) AS DATE) AS "EventDate"
FROM hits_raw;
0 row(s) fetched.
Elapsed 0.010 seconds.

> SELECT COUNT(*) FROM hits WHERE "AdvEngineID" <> 0;

+----------+
| count(*) |
+----------+
| 630500   |
+----------+
1 row(s) fetched.
Elapsed 0.030 seconds.

@alamb alamb added this pull request to the merge queue Jul 16, 2026
Merged via the queue into apache:main with commit 955f70f Jul 16, 2026
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants