zed
zed copied to clipboard
SQL: Fully qualified column names (i.e., including table name)
As of when this issue is being opened, super is at commit 9449896. This was found via a query from a sqllogictest.
In Postgres for example, using a simplified version of that sqllogictest:
$ psql postgres
psql (17.5 (Homebrew))
Type "help" for help.
postgres=# SELECT * FROM test;
a | b
----+----
11 | 22
13 | 22
12 | 21
(3 rows)
postgres=# SELECT test.b FROM test;
b
----
22
22
21
(3 rows)
While the initial GA release of super for operations at the shell is not expected to include any concept of persistent "tables", for SQL compatibility this is likely something we'll want to support with the persistent SuperDB database backend.
Also, it should be noted that the concept appears even in SQL tools when working off files, e.g.,
$ duckdb --version
v1.3.1 (Ossivalis) 2063dda3e6
$ duckdb -c "SELECT test.b FROM 'test.parquet';"
┌───────┐
│ b │
│ int32 │
├───────┤
│ 22 │
│ 22 │
│ 21 │
└───────┘