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
drop table if exists ab;
create table ab (a int, b int);
insert into ab values (1, 1), (2, 2);
drop table if exists bc;
create table bc (b int, c int);
insert into bc values (1, 1), (2, 2);
SELECT * FROM (SELECT * FROM ab join bc on ab.b != bc.b) as abc;
SELECT b FROM (SELECT * FROM ab join bc on ab.b != bc.b) as abc;
MySQL results:
ERROR 1060 (42S21) at line 10: Duplicate column name 'b'
Dolt results:
+---+---+---+---+
| a | b | b | c |
+---+---+---+---+
| 2 | 2 | 1 | 1 |
| 1 | 1 | 2 | 2 |
+---+---+---+---+
+---+
| b |
+---+
| 2 |
| 1 |
+---+
In this example, the table alias has two columns named b, and one of them appears to be selected arbitrarily. We should be consistent with MySQL and reject this.
Repro steps:
MySQL results:
Dolt results:
In this example, the table alias has two columns named
b
, and one of them appears to be selected arbitrarily. We should be consistent with MySQL and reject this.(Mirror of dolthub/go-mysql-server#1881)
The text was updated successfully, but these errors were encountered: