Skip to content

Commit 5d3e8ed

Browse files
authored
Fix rbo tests (#30251)
1 parent cc37a3e commit 5d3e8ed

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

ydb/core/kqp/ut/rbo/kqp_rbo_pg_ut.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include <yql/essentials/parser/pg_wrapper/interface/codec.h>
1010
#include <yql/essentials/utils/log/log.h>
1111
#include <ydb/public/lib/ut_helpers/ut_helpers_query.h>
12+
#include <library/cpp/resource/resource.h>
1213
#include <util/system/env.h>
1314

1415
#include <ctime>
@@ -1284,10 +1285,7 @@ Y_UNIT_TEST_SUITE(KqpRboPg) {
12841285
}
12851286

12861287
for (const auto qId : queries) {
1287-
const TString qPath = TStringBuilder{} << ArcadiaSourceRoot() << "/ydb/library/benchmarks/queries/tpch/pg/" << "q" << qId << ".sql";
1288-
1289-
TIFStream s(qPath);
1290-
std::string q = s.ReadAll();
1288+
std::string q = NResource::Find(TStringBuilder() << "resfs/file/tpch/queries/pg/q" << qId << ".sql");
12911289
Replace(q, "{% include 'header.sql.jinja' %}", "");
12921290
std::regex pattern(R"(\{\{\s*([a-zA-Z0-9_]+)\s*\}\})");
12931291
q = "--!syntax_pg\n" + std::regex_replace(q, pattern, "$1");

ydb/core/kqp/ut/rbo/ya.make

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@ SRCS(
1010
)
1111

1212
PEERDIR(
13+
library/cpp/resource
1314
ydb/core/kqp/ut/common
1415
yql/essentials/public/udf/service/exception_policy
1516
yql/essentials/sql/pg
1617
yql/essentials/parser/pg_wrapper
18+
ydb/library/benchmarks/queries/tpch
1719
ydb/public/lib/ut_helpers
1820
)
1921

@@ -22,9 +24,7 @@ ADDINCL(
2224
)
2325

2426
DATA (
25-
arcadia/ydb/core/kqp/ut/join
26-
arcadia/ydb/library/benchmarks/queries
27-
arcadia/ydb/library/benchmarks/gen_queries/consts.yql
27+
arcadia/ydb/core/kqp/ut/join/data
2828
)
2929

3030
IF (OS_WINDOWS)

0 commit comments

Comments
 (0)