Skip to content

List shared join columns once in RECORDSET OF SELECT * to close #2636 - #3015

Open
mateuscmtropical wants to merge 1 commit into
AlaSQL:developfrom
mateuscmtropical:fix-2636-recordset-star-join
Open

mateuscmtropical wants to merge 1 commit into
AlaSQL:developfrom
mateuscmtropical:fix-2636-recordset-star-join

Conversation

@mateuscmtropical

Copy link
Copy Markdown
Contributor

Closes #2636

What was wrong

compileSelectStar merges a column that several join sources share into one key of the row. It still pushed that column into query.columns once per source. So RECORDSET OF SELECT * FROM t JOIN u ON t.a = u.a listed a twice.

What changed

When the default join mode merges a repeated column into the row, it is no longer added to query.columns again. The column keeps the position and type of its first source. The underscore and json join modes are unchanged.

Tests

test/test2636.js covers the issue example with and without rows, and checks that t.* over the same join is unchanged. The first two cases fail without the fix.

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

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.

RECORDSET OF SELECT * over a join lists a shared column twice

2 participants