pyarrow.acero.OrderByNodeOptions#

class pyarrow.acero.OrderByNodeOptions(sort_keys=(), *, null_placement='at_end')#

Bases: _OrderByNodeOptions

Make a node which applies a new ordering to the data.

Currently this node works by accumulating all data, sorting, and then emitting the new data with an updated batch index. Larger-than-memory sort is not currently supported.

This is the option class for the “order_by” node factory.

Parameters:
sort_keyssequence of (name, order) tuples

Names of field/column keys to sort the input on, along with the order each field/column is sorted in. Accepted values for order are “ascending”, “descending”. Each field reference can be a string column name or expression.

null_placementstr, default “at_end”

Where nulls in input should be sorted, only applying to columns/fields mentioned in sort_keys. Accepted values are “at_start”, “at_end”.

__init__(self, sort_keys=(), *, null_placement='at_end')#

Methods

__init__(self[, sort_keys, null_placement])