A data.frame (or tibble if the tibble package is installed)
with at most k rows ordered by col.
Arguments
x
A shard_row_groups or shard_dataset handle.
col
Column name to rank by.
k
Number of rows to keep.
decreasing
Logical; TRUE for largest values (default TRUE).
na_drop
Logical; drop rows where col is NA (default TRUE).
Details
For native-encoded partitions, this selects candidate rows using the numeric
column without decoding strings, then decodes only the chosen rows for the
returned result.