Skip to content

Commit c25a824

Browse files
committed
Fix TYqlRowSpecInfo::ClearSortness (ydb-platform#9532)
1 parent 831ce2d commit c25a824

File tree

7 files changed

+59
-7
lines changed

7 files changed

+59
-7
lines changed

ydb/library/yql/providers/yt/lib/row_spec/yql_row_spec.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ void TYqlRowSpecInfo::ParseConstraintsNode(TExprContext& ctx) {
530530
Sorted = nullptr;
531531
Unique = nullptr;
532532
Distinct = nullptr;
533-
YQL_CLOG(WARN, ProviderDq) << " Error '" << error << "' on parse constraints node: " << ConstraintsNode.AsString();
533+
YQL_CLOG(WARN, ProviderYt) << " Error '" << error << "' on parse constraints node: " << ConstraintsNode.AsString();
534534
}
535535
}
536536

@@ -1489,6 +1489,7 @@ bool TYqlRowSpecInfo::ClearSortness(TExprContext& ctx, size_t fromMember) {
14891489
SortedByTypes.erase(SortedByTypes.begin() + fromMember, SortedByTypes.end());
14901490
SortDirections.erase(SortDirections.begin() + fromMember, SortDirections.end());
14911491
UniqueKeys = false;
1492+
ParseConstraintsNode(ctx);
14921493
ConstraintsNode.Clear();
14931494
Sorted = MakeSortConstraint(ctx);
14941495
return true;

ydb/library/yql/tests/sql/hybrid_file/part8/canondata/result.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1569,9 +1569,9 @@
15691569
],
15701570
"test.test[join-mergejoin_saves_output_sort--Debug]": [
15711571
{
1572-
"checksum": "832a3bdfcc579e6509f78794316058ef",
1573-
"size": 17734,
1574-
"uri": "https://{canondata_backend}/1937001/cf2822c292da12910b7e5a0fd062f9cafa22374e/resource.tar.gz#test.test_join-mergejoin_saves_output_sort--Debug_/opt.yql_patched"
1572+
"checksum": "c0cef09ee1085acf9360f715f36cdfc2",
1573+
"size": 17767,
1574+
"uri": "https://{canondata_backend}/1937424/bd676d9ef123703690e03ed87d87e5057ac9f7c7/resource.tar.gz#test.test_join-mergejoin_saves_output_sort--Debug_/opt.yql_patched"
15751575
}
15761576
],
15771577
"test.test[join-mergejoin_saves_output_sort--Plan]": [

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9645,6 +9645,13 @@
96459645
"uri": "https://{canondata_backend}/1784117/d56ae82ad9d30397a41490647be1bd2124718f98/resource.tar.gz#test_sql2yql.test_join-yql-16011_/sql.yql"
96469646
}
96479647
],
9648+
"test_sql2yql.test[join-yql-19081]": [
9649+
{
9650+
"checksum": "a413e3ffd94ef733fa06dd92dc938d38",
9651+
"size": 2396,
9652+
"uri": "https://{canondata_backend}/1946324/ea334656ca4ab8298f13987977529870591f2010/resource.tar.gz#test_sql2yql.test_join-yql-19081_/sql.yql"
9653+
}
9654+
],
96489655
"test_sql2yql.test[join-yql-4275]": [
96499656
{
96509657
"checksum": "7a7907d95d2d89a9ace4cb51778168a9",
@@ -29189,6 +29196,13 @@
2918929196
"uri": "https://{canondata_backend}/1880306/64654158d6bfb1289c66c626a8162239289559d0/resource.tar.gz#test_sql_format.test_join-yql-16011_/formatted.sql"
2919029197
}
2919129198
],
29199+
"test_sql_format.test[join-yql-19081]": [
29200+
{
29201+
"checksum": "bb9f87ea7cebf0011816e7e80b447deb",
29202+
"size": 363,
29203+
"uri": "https://{canondata_backend}/1946324/ea334656ca4ab8298f13987977529870591f2010/resource.tar.gz#test_sql_format.test_join-yql-19081_/formatted.sql"
29204+
}
29205+
],
2919229206
"test_sql_format.test[join-yql-4275]": [
2919329207
{
2919429208
"checksum": "702a517333cd9f61febcf59dd7f4c6db",
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
in Input1 sorted_uniq.txt
2+
in Input2 sorted_uniq.txt
3+
in Input3 input1.txt
4+
providers yt
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
USE plato;
2+
3+
pragma yt.JoinMergeTablesLimit="100";
4+
pragma yt.MapJoinLimit="10M";
5+
pragma yt.MaxReplicationFactorToFuseOperations="1";
6+
7+
SELECT
8+
a.key, a.subkey, c.value
9+
FROM Input1 as a
10+
JOIN /*+ merge() */ Input2 as b ON a.key = b.key AND a.subkey = b.subkey
11+
JOIN Input3 as c ON b.key = c.key AND b.subkey = c.subkey
12+
ORDER BY c.value;

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1774,9 +1774,9 @@
17741774
],
17751775
"test.test[join-mergejoin_saves_output_sort--Debug]": [
17761776
{
1777-
"checksum": "a24333420ab20fca434fdf01767a3ebc",
1778-
"size": 14377,
1779-
"uri": "https://{canondata_backend}/1597364/616e247e5d5ae1750729c48aba2deef832a81906/resource.tar.gz#test.test_join-mergejoin_saves_output_sort--Debug_/opt.yql"
1777+
"checksum": "b466fa4cd7de29d3516265235d152608",
1778+
"size": 14410,
1779+
"uri": "https://{canondata_backend}/1937424/6e192910650dc063776d9d3a130fb0472c8ae2d3/resource.tar.gz#test.test_join-mergejoin_saves_output_sort--Debug_/opt.yql"
17801780
}
17811781
],
17821782
"test.test[join-mergejoin_saves_output_sort--Plan]": [

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

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1204,6 +1204,27 @@
12041204
"uri": "https://{canondata_backend}/1936997/9b8859f70925a58b024145127cca3e8e612258c0/resource.tar.gz#test.test_join-three_equalities--Results_/results.txt"
12051205
}
12061206
],
1207+
"test.test[join-yql-19081--Debug]": [
1208+
{
1209+
"checksum": "18379586966c1368e58a985f62460c9f",
1210+
"size": 5904,
1211+
"uri": "https://{canondata_backend}/1900335/e2ae82cdc6e3f1159d5c7c10b0860d7e057c22dd/resource.tar.gz#test.test_join-yql-19081--Debug_/opt.yql"
1212+
}
1213+
],
1214+
"test.test[join-yql-19081--Plan]": [
1215+
{
1216+
"checksum": "7693aa999bbb2a107b3c390098dcfcfd",
1217+
"size": 12510,
1218+
"uri": "https://{canondata_backend}/1900335/e2ae82cdc6e3f1159d5c7c10b0860d7e057c22dd/resource.tar.gz#test.test_join-yql-19081--Plan_/plan.txt"
1219+
}
1220+
],
1221+
"test.test[join-yql-19081--Results]": [
1222+
{
1223+
"checksum": "5c9c88b303c4091cb35ca778529943d2",
1224+
"size": 1392,
1225+
"uri": "https://{canondata_backend}/1900335/e2ae82cdc6e3f1159d5c7c10b0860d7e057c22dd/resource.tar.gz#test.test_join-yql-19081--Results_/results.txt"
1226+
}
1227+
],
12071228
"test.test[json-json_exists/example--Debug]": [
12081229
{
12091230
"checksum": "e5e5e36c86cf040fd4d06930a747c7ce",

0 commit comments

Comments
 (0)