JoinOrder Q8b — Canonical JoinOrder 8b
JoinOrder benchmark · all JoinOrder queries
Canonical JoinOrder SQL query 8b; generated DataFrame translation
Representative SQL
Rendered for DataFusion with default parameters.
SELECT MIN(an.name) AS acress_pseudonym, MIN(t.title) AS japanese_anime_movieFROM aka_name AS an, cast_info AS ci, company_name AS cn, movie_companies AS mc, name AS n, role_type AS rt, title AS tWHERE ci.note = '(voice: English version)' AND cn.country_code = '[jp]' AND mc.note LIKE '%(Japan)%' AND mc.note NOT LIKE '%(USA)%' AND ( mc.note LIKE '%(2006)%' OR mc.note LIKE '%(2007)%' ) AND n.name LIKE '%Yo%' AND n.name NOT LIKE '%Yu%' AND rt.role = 'actress' AND t.production_year BETWEEN 2006 AND 2007 AND ( t.title LIKE 'One Piece%' OR t.title LIKE 'Dragon Ball Z%' ) AND an.person_id = n.id AND n.id = ci.person_id AND ci.movie_id = t.id AND t.id = mc.movie_id AND mc.company_id = cn.id AND ci.role_id = rt.id AND an.person_id = ci.person_id AND ci.movie_id = mc.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['8b'])For the DataFrame form:
from benchbox.core.query_catalog import get_dataframe_render
print(get_dataframe_render('joinorder', '8b', family="expression").source) # or family="pandas"Source
Query text: benchbox/core/joinorder/queries.py