diff --git a/ydb/library/yql/sql/v1/node.cpp b/ydb/library/yql/sql/v1/node.cpp index 0c9fd533f4cb..84df7e5b608b 100644 --- a/ydb/library/yql/sql/v1/node.cpp +++ b/ydb/library/yql/sql/v1/node.cpp @@ -1406,13 +1406,7 @@ StringContentInternal(TContext& ctx, TPosition pos, const TString& input, EStrin TString str = input; if (mode == EStringContentMode::TypedStringLiteral) { auto lower = to_lower(str); - if (lower.EndsWith("s") || lower.EndsWith("b")) { - str = str.substr(0, str.Size() - 1); - result.Type = NKikimr::NUdf::EDataSlot::String; - } else if (lower.EndsWith("u") || lower.EndsWith("t")) { - str = str.substr(0, str.Size() - 1); - result.Type = NKikimr::NUdf::EDataSlot::Utf8; - } else if (lower.EndsWith("y")) { + if (lower.EndsWith("y")) { str = str.substr(0, str.Size() - 1); result.Type = NKikimr::NUdf::EDataSlot::Yson; } else if (lower.EndsWith("j")) { @@ -1430,6 +1424,12 @@ StringContentInternal(TContext& ctx, TPosition pos, const TString& input, EStrin } else if (lower.EndsWith("pv")) { str = str.substr(0, str.Size() - 2); result.PgType = "PgVarchar"; + } else if (lower.EndsWith("s") || lower.EndsWith("b")) { + str = str.substr(0, str.Size() - 1); + result.Type = NKikimr::NUdf::EDataSlot::String; + } else if (lower.EndsWith("u") || lower.EndsWith("t")) { + str = str.substr(0, str.Size() - 1); + result.Type = NKikimr::NUdf::EDataSlot::Utf8; } else { if (ctx.Scoped->WarnUntypedStringLiterals) { ctx.Warning(pos, TIssuesIds::YQL_UNTYPED_STRING_LITERALS)