Skip to content

Sort

import { Aside } from ‘@astrojs/starlight/components’;

Click any column header to sort the data by that column in ascending order. Click the same header again to reverse the sort to descending. The active sort column is highlighted in blue with an arrow indicator (↑ or ↓).

The current sort is also shown in the toolbar: ColumnName ↑

Columnar automatically detects whether a column is numeric or text by sampling the first 100 rows:

  • Numeric columns — sorted by numeric value. 10 comes after 9, not between 1 and 2.
  • Text columns — sorted alphabetically (lexicographic order).

If a column is mostly numeric but has some non-numeric values (like blank cells or N/A), it will still be sorted numerically — non-numeric values sort to the bottom.

Sorting works by doing a single parallel pass through the file extracting the sort column, then sorting a key array using all CPU cores via Rayon. No data is moved — only the display order changes.

File sizeApproximate sort time
Under 100 MBUnder 1 second
1 GB2–5 seconds
14 GB5–15 seconds

There is no explicit “reset sort” button yet. To return to the original file order, close and reopen the file.

Sorting does not affect column statistics. Stats are always computed over the entire column regardless of sort order. See Column stats.