[Bug]: merge_sql_type()
does not handle varchar or nvarchar lengths less than max
#1170
Labels
merge_sql_type()
does not handle varchar or nvarchar lengths less than max
#1170
Singer SDK Version
0.13.1
Python Version
3.9
Bug scope
Targets (data type handling, batching, SQL object generation, etc.)
Operating System
Windows
Description
The
merge_sql_types
function only handles instances in which one of the character columns hasnull
or0
lengths. Both values are converted tomax
by SQLAlchemy so the function is set to prefer them. If there is nomax
present for example only64
or64
the function throws and error letting you know it can't merge the two types.ValueError: Unable to merge sql types: VARCHAR(64) COLLATE "SQL_Latin1_General_CP1_CI_AS", VARCHAR(64)
This was first noticed here #1125 (comment)
Code
The text was updated successfully, but these errors were encountered: