JoinOrder Q2b — Canonical JoinOrder 2b
JoinOrder benchmark · all JoinOrder queries
Canonical JoinOrder SQL query 2b; generated DataFrame translation
Representative SQL
Rendered for DataFusion with default parameters.
SELECT MIN(t.title) AS movie_titleFROM company_name AS cn, keyword AS k, movie_companies AS mc, movie_keyword AS mk, title AS tWHERE cn.country_code = '[nl]' AND k.keyword = 'character-name-in-title' AND cn.id = mc.company_id AND mc.movie_id = t.id AND t.id = mk.movie_id AND mk.keyword_id = k.id AND mc.movie_id = mk.movie_idRepresentative DataFrame
Expression family (Polars, PySpark, DataFusion), default parameters.
def _impl(ctx: DataFrameContext) -> Any: return _execute_joinorder_expression_query(ctx, query_id)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 JoinOrder
bench = JoinOrder(scale_factor=1.0) # your scale factorqueries = bench.get_queries(dialect="datafusion") # your platform's dialect; drop dialect= for native SQLprint(queries['2b'])For the DataFrame form:
from benchbox.core.query_catalog import get_dataframe_render
print(get_dataframe_render('joinorder', '2b', family="expression").source) # or family="pandas"Source
Query text: benchbox/core/joinorder/queries.py