-
Type:
Improvement
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Execution
-
Fully Compatible
-
QE 2026-05-25
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Overview
Complete the RAII migration of vm_builtin_arith.cpp left unfinished by SERVER-114263 (first pass). 24 functions remain on the old auto [_, tag, val] = getFromStack(N) pattern.
Scope of Work
- src/mongo/db/exec/sbe/vm/vm_builtin_arith.cpp — unary/trig functions (abs, ceil, floor, exp, ln, sqrt, all trig variants): convert to viewFromStack; round/pow/sum functions (pow, genericRoundTrunc, round, trunc, builtinDoubleDoubleSum): convert with ownership review
Technical Notes
Use SERVER-114263 and genericDiv in vm_arith.cpp as reference. viewFromStack(N) returns TagValueView — use .tag / .value (no parens). For functions passing the owned flag downstream use moveFromStack.
- is related to
-
SERVER-114263 Refactor sbe vm arithmetic builtins and unit tests to use TagValueView/Owned/MaybeOwned types
-
- Closed
-