Skip to content

Commit fd7f82b

Browse files
committed
Fixed DQ CBO unit test
1 parent 4f48f82 commit fd7f82b

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

ydb/library/yql/dq/opt/dq_cbo_ut.cpp

+6-4
Original file line numberDiff line numberDiff line change
@@ -140,16 +140,17 @@ Y_UNIT_TEST(RelCollector) {
140140
.Done();
141141

142142
TTypeAnnotationContext typeCtx;
143-
UNIT_ASSERT(DqCollectJoinRelationsWithStats(typeCtx, equiJoin, [&](auto, auto) {}) == false);
143+
TVector<std::shared_ptr<TRelOptimizerNode>> rels;
144+
UNIT_ASSERT(DqCollectJoinRelationsWithStats(rels, typeCtx, equiJoin, [&](auto, auto, auto, auto) {}) == false);
144145

145146
typeCtx.StatisticsMap[tables[1].Ptr()->Child(0)] = std::make_shared<TOptimizerStatistics>(1, 1, 1);
146-
UNIT_ASSERT(DqCollectJoinRelationsWithStats(typeCtx, equiJoin, [&](auto, auto) {}) == false);
147+
UNIT_ASSERT(DqCollectJoinRelationsWithStats(rels, typeCtx, equiJoin, [&](auto, auto, auto, auto) {}) == false);
147148

148149
typeCtx.StatisticsMap[tables[0].Ptr()->Child(0)] = std::make_shared<TOptimizerStatistics>(1, 1, 1);
149150
typeCtx.StatisticsMap[tables[2].Ptr()->Child(0)] = std::make_shared<TOptimizerStatistics>(1, 1, 1);
150151

151152
TVector<TString> labels;
152-
UNIT_ASSERT(DqCollectJoinRelationsWithStats(typeCtx, equiJoin, [&](auto label, auto) { labels.emplace_back(label); }) == true);
153+
UNIT_ASSERT(DqCollectJoinRelationsWithStats(rels, typeCtx, equiJoin, [&](auto, auto label, auto, auto) { labels.emplace_back(label); }) == true);
153154
UNIT_ASSERT(labels.size() == 3);
154155
UNIT_ASSERT_STRINGS_EQUAL(labels[0], "orders");
155156
UNIT_ASSERT_STRINGS_EQUAL(labels[1], "customer");
@@ -167,7 +168,8 @@ Y_UNIT_TEST(RelCollectorBrokenEquiJoin) {
167168
.Done();
168169

169170
TTypeAnnotationContext typeCtx;
170-
UNIT_ASSERT(DqCollectJoinRelationsWithStats(typeCtx, equiJoin, [&](auto, auto) {}) == false);
171+
TVector<std::shared_ptr<TRelOptimizerNode>> rels;
172+
UNIT_ASSERT(DqCollectJoinRelationsWithStats(rels, typeCtx, equiJoin, [&](auto, auto, auto, auto) {}) == false);
171173
}
172174

173175
void _DqOptimizeEquiJoinWithCosts(const std::function<IOptimizer*(IOptimizer::TInput&&)>& optFactory) {

0 commit comments

Comments
 (0)