You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix incorrect column names for SELECT * preceded by a WITH
In stephencelis#1139 I introduced support for the `WITH` clause. My implementation contains a bug: the statement preparer doesn't produce the correct result column names for queries containing a `SELECT *` preceded by a `WITH`.
For example, consider the following statement:
```
WITH temp AS ( SELECT id, email from users) SELECT * from temp
```
An error would be thrown when preparing this statement because the glob expansion procedure would try to look up the column names for the result by looking up the column names for the query `SELECT * from temp`. This does not work because `temp` is a temporary view defined in the `WITH` clause.
To fix this, I modified the glob expansion procedure to include the `WITH` clause in the query used to look up the result column names.
0 commit comments