Similar to the Oracle connector's support for SYNONYMs, please add support for the SQL Server connector.
Trino does not have visibility into all database objects in a SQL Server catalog. If we used a pass-thru query, we would be able to see it!
This should be included in metadata queries as well, so that database clients (e.g. DBeaver) connecting to Trino are aware of the "tables".
E.g.
-- Table not found
select * from foobar.dbo.enum_ABC;
-- Works
select * from table(foobar.system.query('SELECT * from enum_ABC'));
-- No results
select * from table(foobar.system.query('
SELECT *
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_NAME = ''enum_ABC''
'));
-- We are able to find it via the database's `sys.synonyms` table
select * from table(foobar.system.query('SELECT * from sys.synonyms'));
For our purposes, we only care about viewing synonyms for TABLEs, VIEWs (and MATERIALIZED VIEWs).
Similar to the Oracle connector's support for
SYNONYM
s, please add support for the SQL Server connector.Trino does not have visibility into all database objects in a SQL Server catalog. If we used a pass-thru query, we would be able to see it!
This should be included in metadata queries as well, so that database clients (e.g. DBeaver) connecting to Trino are aware of the "tables".
E.g.
For our purposes, we only care about viewing synonyms for TABLEs, VIEWs (and MATERIALIZED VIEWs).