Skip to content

TPC-Havoc Q4_v5

TPC-Havoc benchmark · all TPC-Havoc queries

Representative SQL

Rendered for DataFusion with default parameters.

WITH qualified_lineitems AS (
SELECT DISTINCT
l_orderkey
FROM lineitem
WHERE
l_commitdate < l_receiptdate
), qualified_orders AS (
SELECT
o_orderkey,
o_orderpriority
FROM orders
WHERE
o_orderdate >= CAST('1993-07-01' AS DATE)
AND o_orderdate < CAST('1993-07-01' AS DATE) + INTERVAL '3 MONTH'
)
SELECT
qo.o_orderpriority,
COUNT(*) AS order_count
FROM qualified_orders AS qo
INNER JOIN qualified_lineitems AS ql
ON qo.o_orderkey = ql.l_orderkey
GROUP BY
qo.o_orderpriority
ORDER BY
qo.o_orderpriority

Representative DataFrame

No DataFrame implementation is registered for this query.

Get the exact query for your run

The blocks above are representative. To get the precise statement a specific platform runs at a specific scale, substitute your own values:

from benchbox import TPCHavoc
bench = TPCHavoc(scale_factor=0.01) # your scale factor
queries = bench.get_queries(dialect="datafusion") # your platform's dialect; drop dialect= for native SQL
print(queries['4_v5'])

Source

Query text: benchbox/core/tpchavoc/variant_sets/q04.py