Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
vitstn committed Feb 1, 2024
1 parent 53a1e40 commit 64608e5
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions ydb/library/yql/sql/v1/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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")) {
Expand All @@ -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)
Expand Down

0 comments on commit 64608e5

Please sign in to comment.