argSortBits

private fnsize_t[] argSortBits(ArrayData[] chunks, bool descending, bool nullsLast)

The BOOLEAN path: a two-bucket count in scan order - stability for free, no comparisons at all.

Parameters

chunksthe key column's chunks
descendingtrue slots first
nullsLastnulls after the valid entries

Returns

the sorted permutation of 0 .. length.