Skip to content

Conversation

Mytherin
Copy link
Collaborator

@Mytherin Mytherin commented Sep 1, 2020

This PR converts the TPC-H module into a proper extension. The extension can be build by setting the BUILD_TPCH_EXTENSION flag in the cmake config. When compiled in, it is included by default in the shell. The extension provides the following SQL support:

-- dbgen(sf : DOUBLE, overwrite : BOOLEAN, schema : VARCHAR, suffix : VARCHAR)
-- fills the database with the TPC-H tables, parameters are relatively self-describing
-- e.g. to load SF1:
CALL dbgen(sf=1);

-- PRAGMA tpch(query_number)
-- runs the TPC-H query number, valid numbers are in range [1, 22]
-- e.g. to run Q1:
PRAGMA tpch(1);

To enable this, the PR includes support for procedures (e.g. CALL x()) and now stores PRAGMA functions in the catalog, rather than having them be hard-coded into the engine. The interpreted benchmarks are also extended to now support loading results from a file, cleanup and init scripts, require for requiring extensions (like the sqllogictests) and benchmark templates (allowing a templated script to run another benchmark script with some string substitutions, see e.g. the TPC-H SF1 queries in benchmark/tpch/sf1/q...).

…hmarks for verification purposes, and add TPC-H queries back using interpreted benchmarks
@Mytherin Mytherin merged commit 2d8c5d9 into master Sep 2, 2020
@hannes hannes deleted the tpchext branch September 2, 2020 11:58
hawkfish added a commit to hawkfish/duckdb that referenced this pull request Dec 8, 2023
We have been assuming that empty aggregate frames always produce NULL,
but as this example shows, this is not always true.

The test file verifies the behaviour for all aggregates,
and will fail if a new aggregate is added, prompting a new test.

fixes: duckdblabs/duckdb-internal#873
fixes: duckdblabs/huawei#5
Mytherin added a commit that referenced this pull request Dec 11, 2023
Internal #873: Empty Aggregate Frames
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant