diff options
author | robot-piglet <robot-piglet@yandex-team.com> | 2024-12-06 17:43:51 +0300 |
---|---|---|
committer | robot-piglet <robot-piglet@yandex-team.com> | 2024-12-06 18:31:41 +0300 |
commit | d2a0bf3d78be62c7d28bf3de9f3440cafc68b16a (patch) | |
tree | d3e78268b75cf50f79b478b099e136f0eb5d3d80 | |
parent | 5acccd73246568a4d42d6d643756b895f004b6bd (diff) | |
download | ydb-d2a0bf3d78be62c7d28bf3de9f3440cafc68b16a.tar.gz |
Intermediate changes
commit_hash:440a5b88d1dc56dc8619e3ec0e0f1301d73569b8
-rw-r--r-- | yql/essentials/minikql/comp_nodes/ut/mkql_sort_ut.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/yql/essentials/minikql/comp_nodes/ut/mkql_sort_ut.cpp b/yql/essentials/minikql/comp_nodes/ut/mkql_sort_ut.cpp index 4e0f2adad2..5951e0bd9b 100644 --- a/yql/essentials/minikql/comp_nodes/ut/mkql_sort_ut.cpp +++ b/yql/essentials/minikql/comp_nodes/ut/mkql_sort_ut.cpp @@ -619,7 +619,12 @@ Y_UNIT_TEST_SUITE(TMiniKQLStreamKeyExtractorCacheTest) { }; const auto limit = pgmBuilder.NewDataLiteral<ui64>(n); const auto pgmRoot = pgmBuilder.Top(pgmBuilder.Iterator(list, {}), limit, ascending, extractor); - const auto graph = setup.BuildGraph(pgmRoot); + // XXX: The order of the result being yielded by Top + // computation node is not defined by design, hence + // manually sort the result to match the canonical one. + const auto pgmSorted = pgmBuilder.Sort(pgmRoot, pgmBuilder.NewDataLiteral(false), + [&](TRuntimeNode item) { return item; }); + const auto graph = setup.BuildGraph(pgmSorted); const auto& value = graph->GetValue(); NYql::FastPartialSort(test.begin(), test.begin() + n, test.end(), std::greater<ui64>()); @@ -723,7 +728,12 @@ Y_UNIT_TEST_SUITE(TMiniKQLStreamKeyExtractorCacheTest) { }; const auto limit = pgmBuilder.NewDataLiteral<ui64>(n); const auto pgmRoot = pgmBuilder.FromFlow(pgmBuilder.Top(pgmBuilder.ToFlow(list), limit, ascending, extractor)); - const auto graph = setup.BuildGraph(pgmRoot); + // XXX: The order of the result being yielded by Top + // computation node is not defined by design, hence + // manually sort the result to match the canonical one. + const auto pgmSorted = pgmBuilder.Sort(pgmRoot, pgmBuilder.NewDataLiteral(false), + [&](TRuntimeNode item) { return item; }); + const auto graph = setup.BuildGraph(pgmSorted); const auto& value = graph->GetValue(); NYql::FastPartialSort(test.begin(), test.begin() + n, test.end(), std::greater<ui64>()); |