perf: Use sorted flag for (first|last)_non_null
#15050
Merged
Loading
(first|last)_non_null
#15050