Follow-up from PR #42 (execution budget). The V1 budget bounds ORDER BY, GROUP BY, the scalar-aggregate slow path, DISTINCT, and COUNT(DISTINCT). These unbounded buffering operators are NOT bounded yet and can still OOM a budgeted query:
- Joins (
src/execute/join.js): nested-loop buffers all right rows; positional buffers both sides; hash join buffers the entire build side + hashMap.
- Window functions (
src/execute/window.js): the non-streaming path buffers all child rows (+ partition map).
- Set operations (
src/execute/execute.js): UNION DISTINCT seen, INTERSECT rightKeys, EXCEPT rightKeys.
PR #42's ExecutionBudget doc honestly lists these as known V1 limitations. This issue tracks bounding them (charge each side's buffer into the same BufferBudget accountant, throwing QueryBudgetExceededError over the ceiling) so the budget is a complete memory-safety guarantee.
Ref: hypaware bounded-query-execution design LLP 0058, decision LLP 0056.
Follow-up from PR #42 (execution budget). The V1 budget bounds ORDER BY, GROUP BY, the scalar-aggregate slow path, DISTINCT, and COUNT(DISTINCT). These unbounded buffering operators are NOT bounded yet and can still OOM a budgeted query:
src/execute/join.js): nested-loop buffers all right rows; positional buffers both sides; hash join buffers the entire build side + hashMap.src/execute/window.js): the non-streaming path buffers all child rows (+ partition map).src/execute/execute.js): UNION DISTINCTseen, INTERSECTrightKeys, EXCEPTrightKeys.PR #42's
ExecutionBudgetdoc honestly lists these as known V1 limitations. This issue tracks bounding them (charge each side's buffer into the sameBufferBudgetaccountant, throwingQueryBudgetExceededErrorover the ceiling) so the budget is a complete memory-safety guarantee.Ref: hypaware bounded-query-execution design LLP 0058, decision LLP 0056.