Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subquery columns suggestions not working properly #83

Open
jasminediaconu opened this issue Jan 19, 2022 · 0 comments
Open

Subquery columns suggestions not working properly #83

jasminediaconu opened this issue Jan 19, 2022 · 0 comments

Comments

@jasminediaconu
Copy link

Describe the bug
The columns suggestions for subqueries are not always given properly.

To Reproduce
Steps to reproduce the behavior:

WORKING CASE:

  1. Create a sql statement such as:
SELECT * FROM 
    (SELECT sub1.listid, sub1.venuecity FROM 
        (SELECT v.venuecity, l.listid FROM venue v, listing l) sub1 
    ) sub2, users u WHERE u.userid = sub2.venuecity AND u.userid = sub2.listid;
  1. When changing '*' with sub2. the column names listid and venuecity are suggested.

INCORRECT CASE:

  1. Create a sql statement such as:
SELECT * FROM users u,
    (SELECT sub1.listid, sub1.venuecity FROM 
        (SELECT v.venuecity, l.listid FROM venue v, listing l) sub1 
    ) sub2 WHERE u.userid = sub2.venuecity AND u.userid = sub2.listid;
  1. When changing '*' with sub2. the column name listid is suggested, venuecity is not being suggested.

Additional context
It seems like this issue happens when we first add a table in the FROM clause and then a subquery. If we add them the other way around this issue doesn't appear.

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

No branches or pull requests

1 participant