From 6b38afdb570dca3b896ac2cfd71c4f8ed0fe4832 Mon Sep 17 00:00:00 2001 From: Paulius Venclovas Date: Fri, 6 Sep 2024 15:14:00 +0300 Subject: [PATCH] issue-3866 ignore backticks when comparing column type --- catalog/resource_sql_table.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/catalog/resource_sql_table.go b/catalog/resource_sql_table.go index 922d2d0cd2..17665ff8af 100644 --- a/catalog/resource_sql_table.go +++ b/catalog/resource_sql_table.go @@ -489,7 +489,8 @@ var columnTypeAliases = map[string]string{ } func getColumnType(columnType string) string { - caseInsensitiveColumnType := strings.ToLower(columnType) + columnTypeNoBackticks := strings.ReplaceAll(columnType, "`", "") + caseInsensitiveColumnType := strings.ToLower(columnTypeNoBackticks) if alias, ok := columnTypeAliases[caseInsensitiveColumnType]; ok { return alias }