Skip to content

Fix column expansion of REMOVE and PIVOT subqueries - #3214

Open
sanketpatel32 wants to merge 3 commits into
AlaSQL:mainfrom
sanketpatel32:devin/1796225390-fix-remove-pivot-subquery
Open

sanketpatel32 wants to merge 3 commits into
AlaSQL:mainfrom
sanketpatel32:devin/1796225390-fix-remove-pivot-subquery

Conversation

@sanketpatel32

Copy link
Copy Markdown

Thank you for the time you are putting into AlaSQL!

Fixes #3194.

  • REMOVE COLUMN(S) now updates the columns known at compile time, including columns matched by LIKE, so a surrounding SELECT * expands only the columns that remain.
  • PIVOT marks its result columns as row-dependent, and subqueries in JOIN or APPLY use row-derived columns in that case.
  • UNPIVOT derives its output columns at compile time.
  • Adds test/test3194.js for the two statements in the issue, REMOVE COLUMNS LIKE, UNPIVOT, and a joined PIVOT subquery.

Tests: yarn test (3082 pass, 211 skip, 0 fail).

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.

REMOVE COLUMN and PIVOT in a FROM subquery are lost: SELECT * FROM (SELECT * REMOVE COLUMN b FROM t)

1 participant