Commits


David Li authored and Antoine Pitrou committed eee6bf1b6c5
ARROW-7179: [C++][Python][R] Consolidate coalesce/fill_null This removes fill_null in favor of coalesce. A few points: - This leaves behind the Python aliases for convenience. - This is about 25% slower than fill_null for the (Array, Scalar) case for fixed-width types. As far as I can see, this is mostly because the handwritten fill_null only unboxes the scalar once (and does so cheaply), while the generic implementation here unboxes the scalar on every loop (the compiler doesn't manage to hoist it) *and* UnboxScalar is relatively expensive (requiring a virtual call). I tried to make UnboxScalar less expensive but couldn't avoid undefined behavior/incorrect results for the DayTimeIntervalType case. - This specializes all the two-argument cases for fixed-width types but it might not really be worth it except for the (Array, Scalar) case. Closes #10987 from lidavidm/arrow-7179 Lead-authored-by: David Li <li.davidm96@gmail.com> Co-authored-by: Antoine Pitrou <antoine@python.org> Signed-off-by: Antoine Pitrou <antoine@python.org>