pyarrow.acero.OrderByNodeOptions#

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

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, null_placement=”at_end”) tuples

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

null_placementstr, optional

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=None)#

Methods

__init__(self[, sort_keys, null_placement])