diff options
author | Pavel Velikhov <pavelvelikhov@ydb.tech> | 2024-04-18 14:06:27 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-18 14:06:27 +0300 |
commit | 217d8828de8e6dad4dae80a005ef161afd9a0ffb (patch) | |
tree | e6638ba01a9ab05a278c28c521caeaffd683412e | |
parent | 60691c116cad78c810858350cce7f8ee8e9191ba (diff) | |
download | ydb-217d8828de8e6dad4dae80a005ef161afd9a0ffb.tar.gz |
Fixed and unmuted some CBO tests in DQ and YT (#3865)
-rw-r--r-- | .github/config/muted_ya.txt | 3 | ||||
-rw-r--r-- | ydb/library/yql/dq/opt/dq_cbo_ut.cpp | 16 | ||||
-rw-r--r-- | ydb/library/yql/providers/yt/provider/ut/yql_yt_cbo_ut.cpp | 12 | ||||
-rw-r--r-- | ydb/library/yql/tests/sql/dq_file/part17/canondata/result.json | 14 |
4 files changed, 26 insertions, 19 deletions
diff --git a/.github/config/muted_ya.txt b/.github/config/muted_ya.txt index 6fd1dafaf5..fd595c8922 100644 --- a/.github/config/muted_ya.txt +++ b/.github/config/muted_ya.txt @@ -34,10 +34,7 @@ ydb/core/viewer/ut Viewer.TabletMerging ydb/core/viewer/ut Viewer.TabletMergingPacked ydb/library/actors/http/ut HttpProxy.TooLongHeader ydb/library/actors/http/ut sole* -ydb/library/yql/dq/opt/ut DQCBO.JoinSearch3Rels ydb/library/yql/providers/generic/connector/tests* * -ydb/library/yql/providers/yt/provider/ut TYqlCBO.NonReordable -ydb/library/yql/tests/sql/dq_file/part17 *dq-join_cbo_native_3_tables--* ydb/public/lib/ydb_cli/topic/ut TTopicReaderTests.TestRun_ReadOneMessage ydb/public/sdk/cpp/client/ydb_persqueue_core/ut/with_offset_ranges_mode_ut RetryPolicy.RetryWithBatching ydb/public/sdk/cpp/client/ydb_persqueue_core/ut/with_offset_ranges_mode_ut RetryPolicy.TWriteSession_TestBrokenPolicy diff --git a/ydb/library/yql/dq/opt/dq_cbo_ut.cpp b/ydb/library/yql/dq/opt/dq_cbo_ut.cpp index 9c4cd69dcf..874ed433ff 100644 --- a/ydb/library/yql/dq/opt/dq_cbo_ut.cpp +++ b/ydb/library/yql/dq/opt/dq_cbo_ut.cpp @@ -108,16 +108,16 @@ Y_UNIT_TEST(JoinSearch3Rels) { std::stringstream ss; res->Print(ss); - TString expected = R"__(Join: (0,2) a.1=b.1, -Type: 2, Nrows: 4e+13, Ncols: 3, ByteSize: 0, Cost: 4.00004e+13 - Join: (0,2) a.1=c.1, - Type: 2, Nrows: 2e+08, Ncols: 2, ByteSize: 0, Cost: 2.01129e+08 + TString expected = R"__(Join: (0,2) a.1=b.1,a.1=c.1, +Type: 2, Nrows: 4e+13, Ncols: 3, ByteSize: 0, Cost: 4.004e+13 + Join: (0,2) b.1=a.1, + Type: 2, Nrows: 2e+10, Ncols: 2, ByteSize: 0, Cost: 2.00112e+10 + Rel: b + Type: 0, Nrows: 1e+06, Ncols: 1, ByteSize: 0, Cost: 9.00001e+06 Rel: a Type: 0, Nrows: 100000, Ncols: 1, ByteSize: 0, Cost: 1e+06 - Rel: c - Type: 0, Nrows: 10000, Ncols: 1, ByteSize: 0, Cost: 9009 - Rel: b - Type: 0, Nrows: 1e+06, Ncols: 1, ByteSize: 0, Cost: 9.00001e+06 + Rel: c + Type: 0, Nrows: 10000, Ncols: 1, ByteSize: 0, Cost: 9009 )__"; UNIT_ASSERT_STRINGS_EQUAL(expected, ss.str()); diff --git a/ydb/library/yql/providers/yt/provider/ut/yql_yt_cbo_ut.cpp b/ydb/library/yql/providers/yt/provider/ut/yql_yt_cbo_ut.cpp index d0cd838cd4..047920cc71 100644 --- a/ydb/library/yql/providers/yt/provider/ut/yql_yt_cbo_ut.cpp +++ b/ydb/library/yql/providers/yt/provider/ut/yql_yt_cbo_ut.cpp @@ -84,7 +84,17 @@ Y_UNIT_TEST(NonReordable) { TDummyProviderContext optCtx; std::unique_ptr<IOptimizerNew> opt = std::unique_ptr<IOptimizerNew>(NDq::MakeNativeOptimizerNew(optCtx, 1024)); auto result = opt->JoinSearch(root); - UNIT_ASSERT(root == result); + + // Join tree is built from scratch with DPhyp, check the structure by comapring with Stats + UNIT_ASSERT(root->LeftArg->Kind == RelNodeType); + UNIT_ASSERT( + std::static_pointer_cast<TRelOptimizerNode>(root->LeftArg)->Stats == left->Stats + ); + + UNIT_ASSERT(root->RightArg->Kind == RelNodeType); + UNIT_ASSERT( + std::static_pointer_cast<TRelOptimizerNode>(root->RightArg)->Stats == right->Stats + ); } Y_UNIT_TEST(BuildOptimizerTree2Tables) { diff --git a/ydb/library/yql/tests/sql/dq_file/part17/canondata/result.json b/ydb/library/yql/tests/sql/dq_file/part17/canondata/result.json index 2d237c7481..45fb81ef5e 100644 --- a/ydb/library/yql/tests/sql/dq_file/part17/canondata/result.json +++ b/ydb/library/yql/tests/sql/dq_file/part17/canondata/result.json @@ -733,23 +733,23 @@ "test.test[dq-blacklisted_pragmas--Results]": [], "test.test[dq-join_cbo_native_3_tables--Analyze]": [ { - "checksum": "28af22fa1eb3081809b3fb7df709ad55", + "checksum": "39c19c00e4aed3f98be9c240e1eed98e", "size": 12314, - "uri": "https://{canondata_backend}/1936273/7c78e1e45ae282daee686c006624daa21a7c6ca6/resource.tar.gz#test.test_dq-join_cbo_native_3_tables--Analyze_/plan.txt" + "uri": "https://{canondata_backend}/1942671/95400f14ef252649110339f4bfa17e9231e6d6ec/resource.tar.gz#test.test_dq-join_cbo_native_3_tables--Analyze_/plan.txt" } ], "test.test[dq-join_cbo_native_3_tables--Debug]": [ { - "checksum": "1bd9bac68f3302d0878ca13bb2b78c97", - "size": 4756, - "uri": "https://{canondata_backend}/1814674/596b6881e4e692acb2f60c77f02abe1dfca443e9/resource.tar.gz#test.test_dq-join_cbo_native_3_tables--Debug_/opt.yql_patched" + "checksum": "63fe6fc67d9d91e77eb6d0d84f5206de", + "size": 4761, + "uri": "https://{canondata_backend}/1942671/95400f14ef252649110339f4bfa17e9231e6d6ec/resource.tar.gz#test.test_dq-join_cbo_native_3_tables--Debug_/opt.yql_patched" } ], "test.test[dq-join_cbo_native_3_tables--Plan]": [ { - "checksum": "28af22fa1eb3081809b3fb7df709ad55", + "checksum": "39c19c00e4aed3f98be9c240e1eed98e", "size": 12314, - "uri": "https://{canondata_backend}/1936273/7c78e1e45ae282daee686c006624daa21a7c6ca6/resource.tar.gz#test.test_dq-join_cbo_native_3_tables--Plan_/plan.txt" + "uri": "https://{canondata_backend}/1942671/95400f14ef252649110339f4bfa17e9231e6d6ec/resource.tar.gz#test.test_dq-join_cbo_native_3_tables--Plan_/plan.txt" } ], "test.test[dq-join_cbo_native_3_tables--Results]": [ |