JoinOrder Q6b — Canonical JoinOrder 6b
JoinOrder benchmark · all JoinOrder queries
Canonical JoinOrder SQL query 6b; generated DataFrame translation
Representative SQL
Rendered for DataFusion with default parameters.
SELECT MIN(k.keyword) AS movie_keyword, MIN(n.name) AS actor_name, MIN(t.title) AS hero_movieFROM cast_info AS ci, keyword AS k, movie_keyword AS mk, name AS n, title AS tWHERE k.keyword IN ( 'superhero', 'sequel', 'second-part', 'marvel-comics', 'based-on-comic', 'tv-special', 'fight', 'violence' ) AND n.name LIKE '%Downey%Robert%' AND t.production_year > 2014 AND k.id = mk.keyword_id AND t.id = mk.movie_id AND t.id = ci.movie_id AND ci.movie_id = mk.movie_id AND n.id = ci.person_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['6b'])For the DataFrame form:
from benchbox.core.query_catalog import get_dataframe_render
print(get_dataframe_render('joinorder', '6b', family="expression").source) # or family="pandas"Source
Query text: benchbox/core/joinorder/queries.py