Skip to main content

Module sort

Module sort 

Source
Expand description

ORDER BY planning and sort key extraction.

Search-triggering sort detection (vector_distance, bm25_score, rrf_score) is handled in select.rs as part of apply_order_by. This module provides sort key extraction utilities.

Functionsยง

convert_sort_keys
Convert sqlparser OrderByExpr list to SortKey list.
sort_ascending
Whether an ORDER BY key sorts ascending. USING <operator> is refused: no operator orders values here.
sort_nulls_first
Whether an ORDER BY key puts NULLs first. Unstated, NULLs sort last ascending and first descending, as in PostgreSQL.