Skip to content

feat: label computed result columns with their source expression - #41

Merged
Aybavs merged 1 commit into
mainfrom
feat/label-result-columns
Aug 4, 2026
Merged

feat: label computed result columns with their source expression#41
Aybavs merged 1 commit into
mainfrom
feat/label-result-columns

Conversation

@Aybavs

@Aybavs Aybavs commented Aug 4, 2026

Copy link
Copy Markdown
Owner

Result columns for computed projections were all labelled expr, so SELECT city, COUNT(id), AVG(age) ... GROUP BY city printed city | expr | expr.

Adds ast.String, which renders an expression back to SQL-like text (columns, literals, unary/binary operators with parenthesized nesting, IS [NOT] NULL, and aggregate calls including COUNT(*)), and uses it to label projections. A bare column reference still keeps its plain unqualified name, matching SQLite, so join queries print name rather than users.name.

Headers now read city | COUNT(id) | AVG(age).

Closes #40

@Aybavs
Aybavs merged commit 88453e3 into main Aug 4, 2026
1 check passed
@Aybavs
Aybavs deleted the feat/label-result-columns branch August 4, 2026 10:43
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.

Label computed result columns with their source expression

1 participant