This repository was archived by the owner on Apr 30, 2026. It is now read-only.
Commit b7d9b84
committed
fix(query): route GUID group-by to eval path, unblocks (select {by: guid})
(select {from: t by: OrderId}) on 10M rows / 1M distinct GUIDs
hung for minutes (effectively forever) and could not be Ctrl-C'd.
Two compounding bugs in the DAG no-agg no-nonagg branch at
query.c:1700-1708:
* The first-occurrence scan is O(N × n_groups) — 10M × 1M = 10
trillion comparisons, and there is no ray_interrupted() check
inside the inner loop.
* It reads the key column through ray_read_sym which truncates
RAY_GUID to the first 8 bytes, so the comparison is not even
semantically correct for wide keys.
Route RAY_GUID group-by to the eval-level path unconditionally
(previously gated on any_nonagg). ray_group_fn already has a
proper open-addressed 16-byte hash table plus the interrupt /
progress hooks added in the previous commits, so the query now
finishes in ~1.3 s (down from "hang") on the 10M row benchmark.
The O(N × n_groups) integer path is still latent for non-GUID
wide-ish workloads and should get the same hash-table rewrite,
but that is out of scope here — GUID was the reported hang.1 parent b30e0ad commit b7d9b84
1 file changed
Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1028 | 1028 | | |
1029 | 1029 | | |
1030 | 1030 | | |
1031 | | - | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
1032 | 1041 | | |
1033 | 1042 | | |
1034 | 1043 | | |
| |||
0 commit comments