Skip to content

Show result columns in select-list order - #7

Merged
jessestimpson merged 1 commit into
mainfrom
claude/select-column-order
Sep 26, 2026
Merged

jessestimpson merged 1 commit into
mainfrom
claude/select-column-order

Conversation

@jessestimpson

Copy link
Copy Markdown
Contributor

Rows are maps, so the TUI and CLI used to put the columns in alphabetical
order (the TUI put id first). select name, count(*), id came back as
count(*), id, name.

The planner now records the select list's output columns on the plan
(Plan.columns), after removing duplicates. Grouped queries record their
output names. Both result views use that order: the TUI table, the TUI row
inspector, and the CLI's Owl table through its sort_columns option. A
selected field missing from a row shows as null in the CLI instead of
dropping its column. select * has no select list, so it keeps the old
order.

Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01PFBZUrerge6bbWVCHpS5Ko

Rows are maps, so the TUI and CLI used to put the columns in alphabetical
order (the TUI put id first). `select name, count(*), id` came back as
count(*), id, name.

The planner now records the select list's output columns on the plan
(Plan.columns), after removing duplicates. Grouped queries record their
output names. Both result views use that order: the TUI table, the TUI row
inspector, and the CLI's Owl table through its sort_columns option. A
selected field missing from a row shows as null in the CLI instead of
dropping its column. `select *` has no select list, so it keeps the old
order.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PFBZUrerge6bbWVCHpS5Ko
@jessestimpson
jessestimpson merged commit 0f803d0 into main Sep 26, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants