Skip to content

Commit

Permalink
Fix TYqlRowSpecInfo::ClearSortness (#9532)
Browse files Browse the repository at this point in the history
  • Loading branch information
rvu1024 authored Sep 20, 2024
1 parent 6ff0493 commit b30b5bc
Show file tree
Hide file tree
Showing 7 changed files with 59 additions and 7 deletions.
3 changes: 2 additions & 1 deletion ydb/library/yql/providers/yt/lib/row_spec/yql_row_spec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ void TYqlRowSpecInfo::ParseConstraintsNode(TExprContext& ctx) {
Sorted = nullptr;
Unique = nullptr;
Distinct = nullptr;
YQL_CLOG(WARN, ProviderDq) << " Error '" << error << "' on parse constraints node: " << ConstraintsNode.AsString();
YQL_CLOG(WARN, ProviderYt) << " Error '" << error << "' on parse constraints node: " << ConstraintsNode.AsString();
}
}

Expand Down Expand Up @@ -1490,6 +1490,7 @@ bool TYqlRowSpecInfo::ClearSortness(TExprContext& ctx, size_t fromMember) {
SortedByTypes.erase(SortedByTypes.begin() + fromMember, SortedByTypes.end());
SortDirections.erase(SortDirections.begin() + fromMember, SortDirections.end());
UniqueKeys = false;
ParseConstraintsNode(ctx);
ConstraintsNode.Clear();
Sorted = MakeSortConstraint(ctx);
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1569,9 +1569,9 @@
],
"test.test[join-mergejoin_saves_output_sort--Debug]": [
{
"checksum": "832a3bdfcc579e6509f78794316058ef",
"size": 17734,
"uri": "https://{canondata_backend}/1937001/cf2822c292da12910b7e5a0fd062f9cafa22374e/resource.tar.gz#test.test_join-mergejoin_saves_output_sort--Debug_/opt.yql_patched"
"checksum": "c0cef09ee1085acf9360f715f36cdfc2",
"size": 17767,
"uri": "https://{canondata_backend}/1937424/bd676d9ef123703690e03ed87d87e5057ac9f7c7/resource.tar.gz#test.test_join-mergejoin_saves_output_sort--Debug_/opt.yql_patched"
}
],
"test.test[join-mergejoin_saves_output_sort--Plan]": [
Expand Down
14 changes: 14 additions & 0 deletions ydb/library/yql/tests/sql/sql2yql/canondata/result.json
Original file line number Diff line number Diff line change
Expand Up @@ -9673,6 +9673,13 @@
"uri": "https://{canondata_backend}/1784117/d56ae82ad9d30397a41490647be1bd2124718f98/resource.tar.gz#test_sql2yql.test_join-yql-16011_/sql.yql"
}
],
"test_sql2yql.test[join-yql-19081]": [
{
"checksum": "a413e3ffd94ef733fa06dd92dc938d38",
"size": 2396,
"uri": "https://{canondata_backend}/1946324/ea334656ca4ab8298f13987977529870591f2010/resource.tar.gz#test_sql2yql.test_join-yql-19081_/sql.yql"
}
],
"test_sql2yql.test[join-yql-4275]": [
{
"checksum": "7a7907d95d2d89a9ace4cb51778168a9",
Expand Down Expand Up @@ -29343,6 +29350,13 @@
"uri": "https://{canondata_backend}/1880306/64654158d6bfb1289c66c626a8162239289559d0/resource.tar.gz#test_sql_format.test_join-yql-16011_/formatted.sql"
}
],
"test_sql_format.test[join-yql-19081]": [
{
"checksum": "bb9f87ea7cebf0011816e7e80b447deb",
"size": 363,
"uri": "https://{canondata_backend}/1946324/ea334656ca4ab8298f13987977529870591f2010/resource.tar.gz#test_sql_format.test_join-yql-19081_/formatted.sql"
}
],
"test_sql_format.test[join-yql-4275]": [
{
"checksum": "702a517333cd9f61febcf59dd7f4c6db",
Expand Down
4 changes: 4 additions & 0 deletions ydb/library/yql/tests/sql/suites/join/yql-19081.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
in Input1 sorted_uniq.txt
in Input2 sorted_uniq.txt
in Input3 input1.txt
providers yt
12 changes: 12 additions & 0 deletions ydb/library/yql/tests/sql/suites/join/yql-19081.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
USE plato;

pragma yt.JoinMergeTablesLimit="100";
pragma yt.MapJoinLimit="10M";
pragma yt.MaxReplicationFactorToFuseOperations="1";

SELECT
a.key, a.subkey, c.value
FROM Input1 as a
JOIN /*+ merge() */ Input2 as b ON a.key = b.key AND a.subkey = b.subkey
JOIN Input3 as c ON b.key = c.key AND b.subkey = c.subkey
ORDER BY c.value;
Original file line number Diff line number Diff line change
Expand Up @@ -1774,9 +1774,9 @@
],
"test.test[join-mergejoin_saves_output_sort--Debug]": [
{
"checksum": "a24333420ab20fca434fdf01767a3ebc",
"size": 14377,
"uri": "https://{canondata_backend}/1597364/616e247e5d5ae1750729c48aba2deef832a81906/resource.tar.gz#test.test_join-mergejoin_saves_output_sort--Debug_/opt.yql"
"checksum": "b466fa4cd7de29d3516265235d152608",
"size": 14410,
"uri": "https://{canondata_backend}/1937424/6e192910650dc063776d9d3a130fb0472c8ae2d3/resource.tar.gz#test.test_join-mergejoin_saves_output_sort--Debug_/opt.yql"
}
],
"test.test[join-mergejoin_saves_output_sort--Plan]": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1253,6 +1253,27 @@
"uri": "https://{canondata_backend}/1936997/9b8859f70925a58b024145127cca3e8e612258c0/resource.tar.gz#test.test_join-three_equalities--Results_/results.txt"
}
],
"test.test[join-yql-19081--Debug]": [
{
"checksum": "18379586966c1368e58a985f62460c9f",
"size": 5904,
"uri": "https://{canondata_backend}/1900335/e2ae82cdc6e3f1159d5c7c10b0860d7e057c22dd/resource.tar.gz#test.test_join-yql-19081--Debug_/opt.yql"
}
],
"test.test[join-yql-19081--Plan]": [
{
"checksum": "7693aa999bbb2a107b3c390098dcfcfd",
"size": 12510,
"uri": "https://{canondata_backend}/1900335/e2ae82cdc6e3f1159d5c7c10b0860d7e057c22dd/resource.tar.gz#test.test_join-yql-19081--Plan_/plan.txt"
}
],
"test.test[join-yql-19081--Results]": [
{
"checksum": "5c9c88b303c4091cb35ca778529943d2",
"size": 1392,
"uri": "https://{canondata_backend}/1900335/e2ae82cdc6e3f1159d5c7c10b0860d7e057c22dd/resource.tar.gz#test.test_join-yql-19081--Results_/results.txt"
}
],
"test.test[json-json_exists/example--Debug]": [
{
"checksum": "e5e5e36c86cf040fd4d06930a747c7ce",
Expand Down

0 comments on commit b30b5bc

Please sign in to comment.