Skip to content

Commit 954f1df

Browse files
committed
feat: support perfect hash join
1 parent 6274080 commit 954f1df

File tree

18 files changed

+1914
-485
lines changed

18 files changed

+1914
-485
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

benchmarks/bench.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -322,8 +322,7 @@ main() {
322322
echo "NLJ benchmark does not require data generation"
323323
;;
324324
hj)
325-
# hj uses range() function, no data generation needed
326-
echo "HJ benchmark does not require data generation"
325+
data_tpch "10" "parquet"
327326
;;
328327
smj)
329328
# smj uses range() function, no data generation needed
@@ -1228,10 +1227,11 @@ run_nlj() {
12281227

12291228
# Runs the hj benchmark
12301229
run_hj() {
1230+
TPCH_DIR="${DATA_DIR}/tpch_sf10"
12311231
RESULTS_FILE="${RESULTS_DIR}/hj.json"
12321232
echo "RESULTS_FILE: ${RESULTS_FILE}"
12331233
echo "Running hj benchmark..."
1234-
debug_run $CARGO_COMMAND --bin dfbench -- hj --iterations 5 -o "${RESULTS_FILE}" ${QUERY_ARG}
1234+
debug_run $CARGO_COMMAND --bin dfbench -- hj --iterations 5 --path "${TPCH_DIR}" -o "${RESULTS_FILE}" ${QUERY_ARG}
12351235
}
12361236

12371237
# Runs the smj benchmark

benchmarks/compare.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -154,17 +154,17 @@ def compare(
154154
baseline = BenchmarkRun.load_from_file(baseline_path)
155155
comparison = BenchmarkRun.load_from_file(comparison_path)
156156

157-
console = Console()
157+
console = Console(width=200)
158158

159159
# use basename as the column names
160-
baseline_header = baseline_path.parent.stem
161-
comparison_header = comparison_path.parent.stem
160+
baseline_header = baseline_path.parent.name
161+
comparison_header = comparison_path.parent.name
162162

163163
table = Table(show_header=True, header_style="bold magenta")
164-
table.add_column("Query", style="dim", width=12)
165-
table.add_column(baseline_header, justify="right", style="dim")
166-
table.add_column(comparison_header, justify="right", style="dim")
167-
table.add_column("Change", justify="right", style="dim")
164+
table.add_column("Query", style="dim", no_wrap=True)
165+
table.add_column(baseline_header, justify="right", style="dim", no_wrap=True)
166+
table.add_column(comparison_header, justify="right", style="dim", no_wrap=True)
167+
table.add_column("Change", justify="right", style="dim", no_wrap=True)
168168

169169
faster_count = 0
170170
slower_count = 0
@@ -175,12 +175,12 @@ def compare(
175175

176176
for baseline_result, comparison_result in zip(baseline.queries, comparison.queries):
177177
assert baseline_result.query == comparison_result.query
178-
178+
179179
base_failed = not baseline_result.success
180-
comp_failed = not comparison_result.success
180+
comp_failed = not comparison_result.success
181181
# If a query fails, its execution time is excluded from the performance comparison
182182
if base_failed or comp_failed:
183-
change_text = "incomparable"
183+
change_text = "incomparable"
184184
failure_count += 1
185185
table.add_row(
186186
f"Q{baseline_result.query}",

0 commit comments

Comments
 (0)