You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ray_update's by: branch gathers each group's rows into a per-group sub-table with ray_vec_new + raw memcpy, but never propagates RAY_ATTR_HAS_NULLS from the source column. The per-group aggregate then sees raw sentinel payloads as values.
Repro
(set NN (table [k v] (list [1 21 2] (as 'I64 [10 0N 30 40]))))
(at (update {mn: (min v) by: k from: NN}) 'mn) ;; [10 0Nl 10 0Nl] — wrong, should be 10, 40
(at (update {sm: (sum v) by: k from: NN}) 'sm) ;; [40 -9223372036854775768 ...] — sentinel summed in
(select {mn: (min v) from: NN by: k}) ;; 10, 40 — correct oracle
Likely one-line fix adjacent to the gather in ray_update's by: branch: sub_col->attrs |= full_col->attrs & RAY_ATTR_HAS_NULLS; — plus a regression test mirroring the repro (min/sum over a nullable column under update by:, checked against the select by: oracle).
Summary
ray_update'sby:branch gathers each group's rows into a per-group sub-table withray_vec_new+ rawmemcpy, but never propagatesRAY_ATTR_HAS_NULLSfrom the source column. The per-group aggregate then sees raw sentinel payloads as values.Repro
Notes
ray_update'sby:branch:sub_col->attrs |= full_col->attrs & RAY_ATTR_HAS_NULLS;— plus a regression test mirroring the repro (min/sum over a nullable column underupdate by:, checked against theselect by:oracle).