From 3339aefd36ecaf665850a376539e9e3ba3546482 Mon Sep 17 00:00:00 2001 From: Nathan Villaescusa Date: Wed, 1 May 2024 19:31:11 -0700 Subject: [PATCH] Simplify --- lib/sql/dialect.go | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/lib/sql/dialect.go b/lib/sql/dialect.go index d70d479cc..f2d1e97cb 100644 --- a/lib/sql/dialect.go +++ b/lib/sql/dialect.go @@ -4,7 +4,6 @@ import ( "fmt" "log/slog" "slices" - "strconv" "strings" "github.com/artie-labs/transfer/lib/config/constants" @@ -52,14 +51,7 @@ type SnowflakeDialect struct { } func (sd SnowflakeDialect) legacyNeedsEscaping(name string) bool { - if slices.Contains(constants.ReservedKeywords, name) || strings.Contains(name, ":") { - return true - } - // If it still doesn't need to be escaped, we should check if it's a number. - if _, err := strconv.Atoi(name); err == nil { - return true - } - return false + return slices.Contains(constants.ReservedKeywords, name) || strings.Contains(name, ":") } func (sd SnowflakeDialect) QuoteIdentifier(identifier string) string {