rusanoph commented on PR #27746:
URL: https://github.com/apache/datafusion/pull/27746#issuecomment-7176538981

   > > I'd be interested in contributing comparative benchmark results for this 
redesign and discussing potential follow-up optimizations.
   > 
   > [@rusanoph](https://github.com/rusanoph) Thanks, that would help. This PR 
differs from your CSR adapter in what the build moves and when. It keeps one 
directory entry per distinct key and stores a key with one row inline in that 
entry. Only the row IDs of repeated keys move into contiguous groups, and that 
happens in the same pass that builds the directory. There is no second 
organization pass and no admission gate. The `hj` queries closest to your 
low-probe cases are Q4 and Q6 to Q14 (even). They build about 60M `lineitem` 
rows, because the benchmark turns off join reordering, and probe 100K rows, of 
which 10% match. The PR description shows them unchanged to 1.09x faster. The 
build still costs more than on `main`: in my profiles of Q4 and Q5 it takes 
about 2.8x the CPU of `main`'s build, and the queries come out faster only 
because the probe gain is larger. Results from your SNAP and JOB workloads on 
this branch against `main` would be the most useful, including the query shap
 es where your adapter lost time.
   
   @mbutrovich Thanks for the suggestions! I've completed the SNAP and JOB 
comparison, as well as the x86-64 validation of your counting-sort patch and 
the controlled memory experiments.
   
   **Setup:** AMD Ryzen 5 7500F, WSL2, Rust 1.97.0, one logical CPU, one 
execution partition.
   
   Presets:
   - A: main merge-base `6a06058`
   - B: PR head `2f6c665`
   - C: B + your exact counting-sort patch
   
   ### SNAP and JOB (A vs B)
   
   | Workload | Queries | Sum of query medians (A → B) | Reduction | Geomean 
A/B |
   | --- | ---: | ---: | ---: | ---: |
   | SNAP | 35 | 26.266 → 6.814 s | 74.1% | 2.714× |
   | SNAP holdout | 18 | 2.626 → 1.623 s | 38.2% | 1.644× |
   | JOB | 100 | 208.113 → 153.416 s | 26.3% | 0.996× |
   
   All 1,918 observations succeeded with matching outputs and physical plan 
text.
   
   The JOB improvement is concentrated in the six family-17 queries, which 
account for approximately 99% of the net time saved. JOB 7b regressed from 
277.5 to 360.4 ms. Selective Slashdot and Amazon out-star workloads also showed 
smaller slowdowns.
   
   The counting-sort experiment confirms the direction of your M5 Max results 
on x86-64. I also reproduced the resource regression for sparse integer keys 
under a 64 MiB memory-pool limit.
   
   I'll post the details in the corresponding review threads.
   
   **Results and reproducibility:**
   
   - [Validation 
overview](https://github.com/rusanoph/unchained-hash-join-research/blob/ab74b02eff94fd7164538bf54eb990a7e99ca6a8/datafusion/upstream-validation/pr-27746/README.md)
   - [Full SNAP and JOB report, including 
regressions](https://github.com/rusanoph/unchained-hash-join-research/blob/ab74b02eff94fd7164538bf54eb990a7e99ca6a8/datafusion/upstream-validation/pr-27746/reports/comparative-results.md)
   - [Versioned artifact 
release](https://github.com/rusanoph/unchained-hash-join-research/releases/tag/upstream-pr27746-v1)
   
   The package includes the benchmark worker, SQL workloads, raw observations, 
query plans, correctness evidence, source revisions and reproduction scripts. 
The published statistics can be recomputed using `python3 
scripts/verify_evidence.py` without compiling DataFusion or downloading 
datasets.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to