Skip to content

Fix result columns of grouped queries to close #2770 and #2766 - #3000

Open
mateuscmtropical wants to merge 2 commits into
AlaSQL:developfrom
mateuscmtropical:fix-2770-group-dup-columns
Open

mateuscmtropical wants to merge 2 commits into
AlaSQL:developfrom
mateuscmtropical:fix-2770-group-dup-columns

Conversation

@mateuscmtropical

@mateuscmtropical mateuscmtropical commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Closes #2770
Closes #2766

What was wrong

compileSelectGroup0 gives a repeated column a unique nick like c0:1. compileSelectGroup1 writes the output key from the column name, but compileSelectGroup2 wrote group key columns under col.as || col.nick, so the nick leaked into the row. A grouped query also had no query.columns, so MATRIX and RECORDSET took their columns from the row keys.

What changed

Tests

test/test2770.js covers the rows from the issue table, MATRIX, RECORDSET columns, distinct aliases and the MATRIX order from #2766. All but the distinct aliases case fail on develop.

yarn test-only gives 2552 pass on this branch. The only failures are the 5 Test 418 cases that load files from the internet.

@mateuscmtropical mateuscmtropical changed the title Stop adding c0:1 keys for a repeated column with GROUP BY to close #2770 Fix result columns of grouped queries to close #2770 and #2766 Nov 11, 2026
@mathiasrw mathiasrw modified the milestones: v4.x Focus, v5.0.0 Nov 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants