Sort
import { Aside } from ‘@astrojs/starlight/components’;
Sorting by a column
Section titled “Sorting by a column”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 ↑
Numeric vs text sort
Section titled “Numeric vs text sort”Columnar automatically detects whether a column is numeric or text by sampling the first 100 rows:
- Numeric columns — sorted by numeric value.
10comes after9, not between1and2. - 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.
Sort performance
Section titled “Sort performance”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 size | Approximate sort time |
|---|---|
| Under 100 MB | Under 1 second |
| 1 GB | 2–5 seconds |
| 14 GB | 5–15 seconds |
Resetting sort order
Section titled “Resetting sort order”There is no explicit “reset sort” button yet. To return to the original file order, close and reopen the file.
Column stats after sorting
Section titled “Column stats after sorting”Sorting does not affect column statistics. Stats are always computed over the entire column regardless of sort order. See Column stats.