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
When using the MSSQL dialect, .introspect.getTables() returns duplicate columns in certain circumstances. A simple example is a column with the data type nvarcar. The output looks like
This is a known issue caused by how MSSQL manages types internally. It surfaces in the .getTables method where the query joins sys.types to sys.columns on system_type_id when it should be using user_type_id
-- Returns 2 rowsSELECTc.name, ty.name, ty.system_type_id, ty.user_type_idFROMsys.tablesAS t
INNER JOINsys.columnsAS c ONt.object_id=c.object_idINNER JOINsys.typesAS ty ONty.system_type_id=c.system_type_idWHEREt.name='test_table'
VS
-- Returns 1 rowSELECTc.name, ty.name, ty.system_type_id, ty.user_type_idFROMsys.tablesAS t
INNER JOINsys.columnsAS c ONt.object_id=c.object_idINNER JOINsys.typesAS ty ONty.user_type_id=c.user_type_idWHEREt.name='test_table'
The text was updated successfully, but these errors were encountered:
Reproduction Repo
When using the MSSQL dialect,
.introspect.getTables()
returns duplicate columns in certain circumstances. A simple example is a column with the data typenvarcar
. The output looks likeThe Cause
This is a known issue caused by how MSSQL manages types internally. It surfaces in the
.getTables
method where the query joinssys.types
tosys.columns
onsystem_type_id
when it should be usinguser_type_id
VS
The text was updated successfully, but these errors were encountered: