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

Fix: the fields output by Using are not determined by JoinType #205

Open
KKould opened this issue Apr 10, 2024 · 1 comment
Open

Fix: the fields output by Using are not determined by JoinType #205

KKould opened this issue Apr 10, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@KKould
Copy link
Member

KKould commented Apr 10, 2024

Bug Report

statement ok
CREATE TABLE onecolumn (id INT PRIMARY KEY, x INT NULL)

statement ok
CREATE TABLE empty (e_id INT PRIMARY KEY, x INT)

statement ok
INSERT INTO onecolumn(id, x) VALUES (0, 44), (1, NULL), (2, 42)

# FIXME: The fields output by Using are determined by JoinType.
query I
SELECT * FROM onecolumn AS a LEFT OUTER JOIN empty AS b USING(x) ORDER BY x
----
null null 2
null 42 0
null 44 1
@KKould KKould changed the title Fix: the fields output by Using are determined by JoinType Fix: the fields output by Using are not determined by JoinType Apr 10, 2024
@KKould KKould added the bug Something isn't working label Apr 10, 2024
@KKould
Copy link
Member Author

KKould commented Aug 8, 2024

Since using will generate column with the same name, only the column that are used once should be returned at this time, and the returned column should be selected from the left table or the right table according to JoinType.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant