sort¶
Type of operation: Metadata
Description¶
Sort rows in the dataset based on ordering functions applied to column fields or column name provided as arguments.
If a column name is provided without an ordering function, the asc
ordering is implicit. OPAL sort is not stable with respect to fields that are not being sorted.
Usage¶
sort ordering_1, ordering_2, ...
Argument |
Type |
Optional |
Repeatable |
Restrictions |
---|---|---|---|---|
ordering |
ordering |
no |
yes |
constant |
Accelerable¶
sort is always accelerable if the input is accelerable. A dataset that only uses accelerable verbs can be accelerated, making queries on the dataset respond faster.
Examples¶
sort foo
Sort the dataset by the column named foo
(default is in ascending order)
sort asc(podName), desc(clusterId)
Sort the dataset ascending by podName and descending by clusterId