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

CREATE TABLE succeeds when schema has duplicate names, resulting in a table that cannot be selected from #13487

Open
findepi opened this issue Nov 19, 2024 · 1 comment · May be fixed by #13517 or #13489
Assignees
Labels
bug Something isn't working

Comments

@findepi
Copy link
Member

findepi commented Nov 19, 2024

Describe the bug

CREATE TABLE succeeds when schema has duplicate names, resulting in a table that cannot be selected from

To Reproduce

> CREATE TABLE t AS SELECT * FROM (SELECT 1 AS id, 'Foo' AS name) l JOIN (SELECT 1 AS id, 'Bar' as name) r ON l.id = r.id;
0 row(s) fetched.
Elapsed 0.016 seconds.

> SELECT * FROM t;
Schema error: Schema contains duplicate qualified field name t.id

> SELECT count(*) FROM t;
Schema error: Schema contains duplicate qualified field name t.id

Expected behavior

If CREATE TABLE succeeds, the table should be readable.
If the table is not going to be readable (and we know this at create time), the CREATE TABLE should fail.

Additional context

No response

@findepi findepi added the bug Something isn't working label Nov 19, 2024
@findepi
Copy link
Member Author

findepi commented Nov 19, 2024

take

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
1 participant