Skip to content

Commit dda1750

Browse files
authored
Merge 882ac1a into d4c45f7
2 parents d4c45f7 + 882ac1a commit dda1750

File tree

9 files changed

+37
-41
lines changed

9 files changed

+37
-41
lines changed

ydb/library/yql/sql/v1/SQLv1.g.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -1783,7 +1783,7 @@ fragment STRING_SINGLE: (QUOTE_SINGLE STRING_CORE_SINGLE* QUOTE_SINGLE);
17831783
fragment STRING_DOUBLE: (QUOTE_DOUBLE STRING_CORE_DOUBLE* QUOTE_DOUBLE);
17841784
fragment STRING_MULTILINE: (DOUBLE_AT .* DOUBLE_AT)+ AT?;
17851785

1786-
STRING_VALUE: ((STRING_SINGLE | STRING_DOUBLE | STRING_MULTILINE) (S | B | T | U | Y | J | P (T | B | V)?)?);
1786+
STRING_VALUE: ((STRING_SINGLE | STRING_DOUBLE | STRING_MULTILINE) (S | U | Y | J | P (T | B | V)?)?);
17871787

17881788
ID_PLAIN: ('a'..'z' | 'A'..'Z' | '_') ('a'..'z' | 'A'..'Z' | '_' | DIGIT)*;
17891789

ydb/library/yql/sql/v1/node.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -1424,16 +1424,16 @@ StringContentInternal(TContext& ctx, TPosition pos, const TString& input, EStrin
14241424
} else if (lower.EndsWith("pv")) {
14251425
str = str.substr(0, str.Size() - 2);
14261426
result.PgType = "PgVarchar";
1427-
} else if (lower.EndsWith("s") || lower.EndsWith("b")) {
1427+
} else if (lower.EndsWith("s")) {
14281428
str = str.substr(0, str.Size() - 1);
14291429
result.Type = NKikimr::NUdf::EDataSlot::String;
1430-
} else if (lower.EndsWith("u") || lower.EndsWith("t")) {
1430+
} else if (lower.EndsWith("u")) {
14311431
str = str.substr(0, str.Size() - 1);
14321432
result.Type = NKikimr::NUdf::EDataSlot::Utf8;
14331433
} else {
14341434
if (ctx.Scoped->WarnUntypedStringLiterals) {
14351435
ctx.Warning(pos, TIssuesIds::YQL_UNTYPED_STRING_LITERALS)
1436-
<< "Please add suffix u or t for Utf8 strings or s or b for arbitrary binary strings";
1436+
<< "Please add suffix u for Utf8 strings or s for arbitrary binary strings";
14371437
}
14381438

14391439
if (ctx.Scoped->UnicodeLiterals) {

ydb/library/yql/tests/sql/dq_file/part14/canondata/result.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1023,9 +1023,9 @@
10231023
],
10241024
"test.test[expr-unicode_literals-default.txt-Debug]": [
10251025
{
1026-
"checksum": "9201dbe44a3334deb0a063d58468a160",
1027-
"size": 522,
1028-
"uri": "https://{canondata_backend}/1871002/fb6fb37c565974a6f0c497e8b3e58f6b5bf320b2/resource.tar.gz#test.test_expr-unicode_literals-default.txt-Debug_/opt.yql_patched"
1026+
"checksum": "a65d6b9299b9ecfa68d1377414a3d814",
1027+
"size": 462,
1028+
"uri": "https://{canondata_backend}/1925842/c2ce7c5eeafa7c99dd47a4e0bc6a7304dd057c69/resource.tar.gz#test.test_expr-unicode_literals-default.txt-Debug_/opt.yql_patched"
10291029
}
10301030
],
10311031
"test.test[expr-unicode_literals-default.txt-Plan]": [
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<tmp_path>/program.sql:<main>: Warning: Parse Sql
22

3-
<tmp_path>/program.sql:<main>:9:6: Warning: Please add suffix u or t for Utf8 strings or s or b for arbitrary binary strings
4-
"e");
3+
<tmp_path>/program.sql:<main>:7:6: Warning: Please add suffix u for Utf8 strings or s for arbitrary binary strings
4+
"c");
55
^
66
<tmp_path>/program.sql:<main>: Warning: Parse Sql
77

8-
<tmp_path>/program.sql:<main>:9:6: Warning: Please add suffix u or t for Utf8 strings or s or b for arbitrary binary strings
9-
"e");
8+
<tmp_path>/program.sql:<main>:7:6: Warning: Please add suffix u for Utf8 strings or s for arbitrary binary strings
9+
"c");
1010
^
1111
<tmp_path>/program.sql:<main>: Warning: Parse Sql
1212

13-
<tmp_path>/program.sql:<main>:9:6: Warning: Please add suffix u or t for Utf8 strings or s or b for arbitrary binary strings
14-
"e");
13+
<tmp_path>/program.sql:<main>:7:6: Warning: Please add suffix u for Utf8 strings or s for arbitrary binary strings
14+
"c");
1515
^
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<tmp_path>/program.sql:<main>: Warning: Parse Sql
22

3-
<tmp_path>/program.sql:<main>:9:6: Warning: Please add suffix u or t for Utf8 strings or s or b for arbitrary binary strings
4-
"e");
3+
<tmp_path>/program.sql:<main>:7:6: Warning: Please add suffix u for Utf8 strings or s for arbitrary binary strings
4+
"c");
55
^
66
<tmp_path>/program.sql:<main>: Warning: Parse Sql
77

8-
<tmp_path>/program.sql:<main>:9:6: Warning: Please add suffix u or t for Utf8 strings or s or b for arbitrary binary strings
9-
"e");
8+
<tmp_path>/program.sql:<main>:7:6: Warning: Please add suffix u for Utf8 strings or s for arbitrary binary strings
9+
"c");
1010
^
1111
<tmp_path>/program.sql:<main>: Warning: Parse Sql
1212

13-
<tmp_path>/program.sql:<main>:9:6: Warning: Please add suffix u or t for Utf8 strings or s or b for arbitrary binary strings
14-
"e");
13+
<tmp_path>/program.sql:<main>:7:6: Warning: Please add suffix u for Utf8 strings or s for arbitrary binary strings
14+
"c");
1515
^

ydb/library/yql/tests/sql/sql2yql/canondata/result.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -5804,9 +5804,9 @@
58045804
],
58055805
"test_sql2yql.test[expr-unicode_literals]": [
58065806
{
5807-
"checksum": "9be93914e3d28b675e0eee080ef248ec",
5808-
"size": 1964,
5809-
"uri": "https://{canondata_backend}/1937367/9f749035d8f07b7ae5537f5aebd224641b378134/resource.tar.gz#test_sql2yql.test_expr-unicode_literals_/sql.yql"
5807+
"checksum": "ee24a9f27885bf7ae3f4b2db0d677a0a",
5808+
"size": 1912,
5809+
"uri": "https://{canondata_backend}/1777230/02994451d1c8953a8e9142350351d7282debc251/resource.tar.gz#test_sql2yql.test_expr-unicode_literals_/sql.yql"
58105810
}
58115811
],
58125812
"test_sql2yql.test[expr-untag]": [
@@ -23304,9 +23304,9 @@
2330423304
],
2330523305
"test_sql_format.test[expr-unicode_literals]": [
2330623306
{
23307-
"checksum": "b470490a33e28dd2537f12d80329216a",
23308-
"size": 374,
23309-
"uri": "https://{canondata_backend}/1937367/9f749035d8f07b7ae5537f5aebd224641b378134/resource.tar.gz#test_sql_format.test_expr-unicode_literals_/formatted.sql"
23307+
"checksum": "e8e56821ff77c888713ff8852fb1518a",
23308+
"size": 318,
23309+
"uri": "https://{canondata_backend}/1777230/02994451d1c8953a8e9142350351d7282debc251/resource.tar.gz#test_sql_format.test_expr-unicode_literals_/formatted.sql"
2331023310
}
2331123311
],
2331223312
"test_sql_format.test[expr-untag]": [

ydb/library/yql/tests/sql/suites/expr/unicode_literals.sql

+4-8
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@ pragma UnicodeLiterals;
33
$f = ()->{
44
return (
55
"a"s,
6-
"b"b,
7-
"c"t,
8-
"d"u,
9-
"e");
6+
"b"u,
7+
"c");
108
};
119

1210
select $f();
@@ -16,10 +14,8 @@ pragma DisableUnicodeLiterals;
1614
$g = ()->{
1715
return (
1816
"a"s,
19-
"b"b,
20-
"c"t,
21-
"d"u,
22-
"e");
17+
"b"u,
18+
"c");
2319
};
2420

2521
select $g();

ydb/library/yql/tests/sql/yt_native_file/part14/canondata/result.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -1027,9 +1027,9 @@
10271027
],
10281028
"test.test[expr-unicode_literals-default.txt-Debug]": [
10291029
{
1030-
"checksum": "b21fde16b24ef5500d9c21f811fc800b",
1031-
"size": 452,
1032-
"uri": "https://{canondata_backend}/1942671/fe81aca6675f95264895c6b4c3bafedf6b92cfd5/resource.tar.gz#test.test_expr-unicode_literals-default.txt-Debug_/opt.yql"
1030+
"checksum": "3f03a04f8c9c6e18430956926497586a",
1031+
"size": 394,
1032+
"uri": "https://{canondata_backend}/1777230/7741a861d2b9bc50c005d3f3c3fb85c0e7005074/resource.tar.gz#test.test_expr-unicode_literals-default.txt-Debug_/opt.yql"
10331033
}
10341034
],
10351035
"test.test[expr-unicode_literals-default.txt-Plan]": [
@@ -1041,9 +1041,9 @@
10411041
],
10421042
"test.test[expr-unicode_literals-default.txt-Results]": [
10431043
{
1044-
"checksum": "634838888e147228dfbca0438c1c75d5",
1045-
"size": 3698,
1046-
"uri": "https://{canondata_backend}/1942671/fe81aca6675f95264895c6b4c3bafedf6b92cfd5/resource.tar.gz#test.test_expr-unicode_literals-default.txt-Results_/results.txt"
1044+
"checksum": "2b32d6241e0e4814c15d8c9eae970191",
1045+
"size": 2794,
1046+
"uri": "https://{canondata_backend}/1777230/7741a861d2b9bc50c005d3f3c3fb85c0e7005074/resource.tar.gz#test.test_expr-unicode_literals-default.txt-Results_/results.txt"
10471047
},
10481048
{
10491049
"uri": "file://test.test_expr-unicode_literals-default.txt-Results_/extracted"
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<tmp_path>/program.sql:<main>: Warning: Parse Sql
22

3-
<tmp_path>/program.sql:<main>:9:6: Warning: Please add suffix u or t for Utf8 strings or s or b for arbitrary binary strings
4-
"e");
3+
<tmp_path>/program.sql:<main>:7:6: Warning: Please add suffix u for Utf8 strings or s for arbitrary binary strings
4+
"c");
55
^

0 commit comments

Comments
 (0)