Skip to content

Commit d1a3a03

Browse files
author
Pavel Velikhov
committed
Got it all working
1 parent c119de6 commit d1a3a03

File tree

4 files changed

+14
-1
lines changed

4 files changed

+14
-1
lines changed

ydb/core/kqp/host/kqp_translate.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ TKqpTranslationSettingsBuilder& TKqpTranslationSettingsBuilder::SetFromConfig(co
187187
// only options that should be specified for all types of queries
188188
// including views and etc..
189189
SetLangVer(config.LangVer);
190+
SetBackportMode(config.BackportMode);
190191
SetIsAmbiguityError(config.Antlr4ParserIsAmbiguityError);
191192
return *this;
192193
}

ydb/core/kqp/host/kqp_translate.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,11 @@ class TKqpTranslationSettingsBuilder {
151151
return *this;
152152
}
153153

154+
TKqpTranslationSettingsBuilder& SetBackportMode(NYql::EBackportCompatibleFeaturesMode backportMode) {
155+
BackportMode = backportMode;
156+
return *this;
157+
}
158+
154159
TKqpTranslationSettingsBuilder& SetIsAmbiguityError(bool isAmbiguityError) {
155160
IsAmbiguityError = isAmbiguityError;
156161
return *this;

ydb/core/kqp/opt/rbo/kqp_rbo_transformer.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@ namespace {
1414
TExprNode::TPtr PushTakeIntoPlan(const TExprNode::TPtr &node, TExprContext &ctx, const TTypeAnnotationContext &typeCtx) {
1515
Y_UNUSED(typeCtx);
1616
auto take = TCoTake(node);
17-
if (auto root = take.Input().Maybe<TKqpOpRoot>()) {
17+
auto takeInput = take.Input();
18+
if (takeInput.Maybe<TCoUnordered>()) {
19+
takeInput = takeInput.Cast<TCoUnordered>().Input();
20+
}
21+
22+
if (auto root = takeInput.Maybe<TKqpOpRoot>()) {
1823
// clang-format off
1924
return Build<TKqpOpRoot>(ctx, node->Pos())
2025
.Input<TKqpOpLimit>()

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ Y_UNIT_TEST_SUITE(KqpRboYql) {
8686
NKikimrConfig::TAppConfig appConfig;
8787
appConfig.MutableTableServiceConfig()->SetEnableNewRBO(true);
8888
appConfig.MutableTableServiceConfig()->SetBackportMode(NKikimrConfig::TTableServiceConfig_EBackportMode_All);
89+
appConfig.MutableTableServiceConfig()->SetDefaultLangVer(NYql::GetMaxLangVersion());
90+
8991
TKikimrRunner kikimr(NKqp::TKikimrSettings(appConfig).SetWithSampleTables(false));
9092
auto db = kikimr.GetTableClient();
9193
auto session = db.CreateSession().GetValueSync().GetSession();

0 commit comments

Comments
 (0)