A LazyFrame group cummax ran through the window kernel, not elementwise.cpp, so NaN is greatest and -0.0 groups with 0.0
Statement#
Before the native group transform, LazyGroupBy.transform (cumsum, cummax, cummin, cumprod, shift, diff, ffill) used composed_transform in group_transform.cpp. That builds a dftu.frame.window op with DFTU_WINDOW_RUNNING_MAX and similar, which runs in ops/window.cpp (running, delta, positional). Its min and max use better(), then ColumnView::compare, then compare_doubles: NaN is greatest and equal to NaN, so cummax([1,NaN,5]) is [1,NaN,NaN]. Groups come from order_rows and same_keys, so -0.0 and 0.0 are one group, and all NaN keys are one group. The composed plan also adds + (c - c) as a post step, which turns inf and NaN into NaN. The eager Series.cummax in kernels/elementwise.cpp is a different path with plain >, and group_by().agg() keys floats by IEEE total order. Do not use either of them as the reference for the lazy group transform.
Evidence#
Read on 2026-10-08 in the genesis-memory worktree: group_transform.cpp:274 (RUNNING_MAX spec), ops/window.cpp:114 (better), :292 (min/max), :1028 (partitions via run_end), kernels/order.cpp:46 (compare_doubles), :190 (same_keys). An implementation agent wrongly cited elementwise.cpp and agg/finalize.cpp; the native path was then fixed to match the window kernel, and the shared order moved to kernels/order.h.
Also found by searching
- native group transform gives different cummax with NaN
- which kernel did the lazy group cummax use before
- -0.0 and 0.0 one group or two in group transform
- reference path for a differential test of group_transform