diff --git a/ydb/library/yql/providers/yt/lib/row_spec/yql_row_spec.cpp b/ydb/library/yql/providers/yt/lib/row_spec/yql_row_spec.cpp index 91a0a2265066..ae5324d68dcc 100644 --- a/ydb/library/yql/providers/yt/lib/row_spec/yql_row_spec.cpp +++ b/ydb/library/yql/providers/yt/lib/row_spec/yql_row_spec.cpp @@ -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(); } } @@ -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; diff --git a/ydb/library/yql/tests/sql/hybrid_file/part8/canondata/result.json b/ydb/library/yql/tests/sql/hybrid_file/part8/canondata/result.json index a81f34511cdd..3f54e87a8e63 100644 --- a/ydb/library/yql/tests/sql/hybrid_file/part8/canondata/result.json +++ b/ydb/library/yql/tests/sql/hybrid_file/part8/canondata/result.json @@ -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]": [ diff --git a/ydb/library/yql/tests/sql/sql2yql/canondata/result.json b/ydb/library/yql/tests/sql/sql2yql/canondata/result.json index 31980b046784..46c16bd491ee 100644 --- a/ydb/library/yql/tests/sql/sql2yql/canondata/result.json +++ b/ydb/library/yql/tests/sql/sql2yql/canondata/result.json @@ -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", @@ -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", diff --git a/ydb/library/yql/tests/sql/suites/join/yql-19081.cfg b/ydb/library/yql/tests/sql/suites/join/yql-19081.cfg new file mode 100644 index 000000000000..aaba13cbfae9 --- /dev/null +++ b/ydb/library/yql/tests/sql/suites/join/yql-19081.cfg @@ -0,0 +1,4 @@ +in Input1 sorted_uniq.txt +in Input2 sorted_uniq.txt +in Input3 input1.txt +providers yt diff --git a/ydb/library/yql/tests/sql/suites/join/yql-19081.sql b/ydb/library/yql/tests/sql/suites/join/yql-19081.sql new file mode 100644 index 000000000000..215ba02fe4d4 --- /dev/null +++ b/ydb/library/yql/tests/sql/suites/join/yql-19081.sql @@ -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; diff --git a/ydb/library/yql/tests/sql/yt_native_file/part12/canondata/result.json b/ydb/library/yql/tests/sql/yt_native_file/part12/canondata/result.json index 023c91cf71f9..d9fd138d63f5 100644 --- a/ydb/library/yql/tests/sql/yt_native_file/part12/canondata/result.json +++ b/ydb/library/yql/tests/sql/yt_native_file/part12/canondata/result.json @@ -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]": [ diff --git a/ydb/library/yql/tests/sql/yt_native_file/part4/canondata/result.json b/ydb/library/yql/tests/sql/yt_native_file/part4/canondata/result.json index 5cc70ef09d34..dbbc937a140c 100644 --- a/ydb/library/yql/tests/sql/yt_native_file/part4/canondata/result.json +++ b/ydb/library/yql/tests/sql/yt_native_file/part4/canondata/result.json @@ -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",