Skip to content

Commit b30b5bc

Browse files
authored
Fix TYqlRowSpecInfo::ClearSortness (#9532)
1 parent 6ff0493 commit b30b5bc

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

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

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

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

+3-3
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

+14
Original file line numberDiff line numberDiff line change
@@ -9673,6 +9673,13 @@
96739673
"uri": "https://{canondata_backend}/1784117/d56ae82ad9d30397a41490647be1bd2124718f98/resource.tar.gz#test_sql2yql.test_join-yql-16011_/sql.yql"
96749674
}
96759675
],
9676+
"test_sql2yql.test[join-yql-19081]": [
9677+
{
9678+
"checksum": "a413e3ffd94ef733fa06dd92dc938d38",
9679+
"size": 2396,
9680+
"uri": "https://{canondata_backend}/1946324/ea334656ca4ab8298f13987977529870591f2010/resource.tar.gz#test_sql2yql.test_join-yql-19081_/sql.yql"
9681+
}
9682+
],
96769683
"test_sql2yql.test[join-yql-4275]": [
96779684
{
96789685
"checksum": "7a7907d95d2d89a9ace4cb51778168a9",
@@ -29343,6 +29350,13 @@
2934329350
"uri": "https://{canondata_backend}/1880306/64654158d6bfb1289c66c626a8162239289559d0/resource.tar.gz#test_sql_format.test_join-yql-16011_/formatted.sql"
2934429351
}
2934529352
],
29353+
"test_sql_format.test[join-yql-19081]": [
29354+
{
29355+
"checksum": "bb9f87ea7cebf0011816e7e80b447deb",
29356+
"size": 363,
29357+
"uri": "https://{canondata_backend}/1946324/ea334656ca4ab8298f13987977529870591f2010/resource.tar.gz#test_sql_format.test_join-yql-19081_/formatted.sql"
29358+
}
29359+
],
2934629360
"test_sql_format.test[join-yql-4275]": [
2934729361
{
2934829362
"checksum": "702a517333cd9f61febcf59dd7f4c6db",
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
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

+3-3
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

+21
Original file line numberDiff line numberDiff line change
@@ -1253,6 +1253,27 @@
12531253
"uri": "https://{canondata_backend}/1936997/9b8859f70925a58b024145127cca3e8e612258c0/resource.tar.gz#test.test_join-three_equalities--Results_/results.txt"
12541254
}
12551255
],
1256+
"test.test[join-yql-19081--Debug]": [
1257+
{
1258+
"checksum": "18379586966c1368e58a985f62460c9f",
1259+
"size": 5904,
1260+
"uri": "https://{canondata_backend}/1900335/e2ae82cdc6e3f1159d5c7c10b0860d7e057c22dd/resource.tar.gz#test.test_join-yql-19081--Debug_/opt.yql"
1261+
}
1262+
],
1263+
"test.test[join-yql-19081--Plan]": [
1264+
{
1265+
"checksum": "7693aa999bbb2a107b3c390098dcfcfd",
1266+
"size": 12510,
1267+
"uri": "https://{canondata_backend}/1900335/e2ae82cdc6e3f1159d5c7c10b0860d7e057c22dd/resource.tar.gz#test.test_join-yql-19081--Plan_/plan.txt"
1268+
}
1269+
],
1270+
"test.test[join-yql-19081--Results]": [
1271+
{
1272+
"checksum": "5c9c88b303c4091cb35ca778529943d2",
1273+
"size": 1392,
1274+
"uri": "https://{canondata_backend}/1900335/e2ae82cdc6e3f1159d5c7c10b0860d7e057c22dd/resource.tar.gz#test.test_join-yql-19081--Results_/results.txt"
1275+
}
1276+
],
12561277
"test.test[json-json_exists/example--Debug]": [
12571278
{
12581279
"checksum": "e5e5e36c86cf040fd4d06930a747c7ce",

0 commit comments

Comments
 (0)