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

Unexpected SELECT * with Join #2786

Closed
zhang2014 opened this issue Aug 2, 2018 · 3 comments
Closed

Unexpected SELECT * with Join #2786

zhang2014 opened this issue Aug 2, 2018 · 3 comments

Comments

@zhang2014
Copy link
Contributor

Steps to reproduce the behavior

SELECT * FROM (SELECT 1 AS id, 2 AS value) ANY INNER JOIN (SELECT 1 AS id, 2 AS values) USING id;

Expected Result

1 2 2

Actual Result

1 2

@alesapin
Copy link
Member

alesapin commented Aug 2, 2018

Yes, this is weird, but this behaviour is documented and works according to documentation:

All columns that are not needed for the JOIN are deleted from the subquery.

subquery here is right part of join. Currently you have to specify all required columns.

@zhang2014
Copy link
Contributor Author

I am currently trying to fix this problem, but it is not compatible with the version.

@TimonKK
Copy link

TimonKK commented Aug 3, 2018

It is same problem

alexey-milovidov added a commit that referenced this issue Aug 5, 2018
…side a subquery if some column was queried more than once #2786
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants