Skip to content

Commit c6746fb

Browse files
committed
Delete SSA_RUNTIME_VERSION in favour of feature flags (#18451)
Conflicts: ydb/core/kqp/compile_service/kqp_compile_service.cpp ydb/core/protos/table_service_config.proto
1 parent 78d52ac commit c6746fb

File tree

56 files changed

+92
-208
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+92
-208
lines changed

ydb/core/formats/arrow/ssa_runtime_version.h

Lines changed: 0 additions & 35 deletions
This file was deleted.

ydb/core/kqp/compile_service/kqp_compile_actor.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -654,6 +654,7 @@ void ApplyServiceConfig(TKikimrConfiguration& kqpConfig, const TTableServiceConf
654654
kqpConfig.EnableSnapshotIsolationRW = serviceConfig.GetEnableSnapshotIsolationRW();
655655
kqpConfig.EnableSpilling = serviceConfig.GetEnableQueryServiceSpilling();
656656
kqpConfig.EnableSpillingInHashJoinShuffleConnections = serviceConfig.GetEnableSpillingInHashJoinShuffleConnections();
657+
kqpConfig.EnableOlapScalarApply = serviceConfig.GetEnableOlapScalarApply();
657658

658659
if (const auto limit = serviceConfig.GetResourceManager().GetMkqlHeavyProgramMemoryLimit()) {
659660
kqpConfig._KqpYqlCombinerMemoryLimit = std::max(1_GB, limit - (limit >> 2U));

ydb/core/kqp/compile_service/kqp_compile_service.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,7 @@ class TKqpCompileService : public TActorBootstrapped<TKqpCompileService> {
319319
bool enableSnapshotIsolationRW = TableServiceConfig.GetEnableSnapshotIsolationRW();
320320

321321
bool enableSpillingInHashJoinShuffleConnections = TableServiceConfig.GetEnableSpillingInHashJoinShuffleConnections();
322+
bool enableOlapScalarApply = TableServiceConfig.GetEnableOlapScalarApply();
322323

323324
TableServiceConfig.Swap(event.MutableConfig()->MutableTableServiceConfig());
324325
LOG_INFO(*TlsActivationContext, NKikimrServices::KQP_COMPILE_SERVICE, "Updated config");
@@ -353,7 +354,9 @@ class TKqpCompileService : public TActorBootstrapped<TKqpCompileService> {
353354
TableServiceConfig.GetEnableSnapshotIsolationRW() != enableSnapshotIsolationRW ||
354355
TableServiceConfig.GetEnableQueryServiceSpilling() != enableSpilling ||
355356
TableServiceConfig.GetDefaultEnableShuffleElimination() != defaultEnableShuffleElimination ||
356-
TableServiceConfig.GetEnableSpillingInHashJoinShuffleConnections() != enableSpillingInHashJoinShuffleConnections)
357+
TableServiceConfig.GetEnableSpillingInHashJoinShuffleConnections() != enableSpillingInHashJoinShuffleConnections ||
358+
TableServiceConfig.GetEnableOlapScalarApply() != enableOlapScalarApply
359+
)
357360
{
358361

359362
QueryCache->Clear();

ydb/core/kqp/opt/physical/kqp_opt_phy_olap_agg.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
#include <ydb/core/kqp/common/kqp_yql.h>
44

5-
#include <ydb/core/formats/arrow/ssa_runtime_version.h>
6-
75
#include <yql/essentials/core/yql_opt_utils.h>
86
#include <ydb/library/actors/core/log.h>
97

ydb/core/kqp/opt/physical/kqp_opt_phy_olap_filter.cpp

Lines changed: 41 additions & 41 deletions
Large diffs are not rendered by default.

ydb/core/kqp/opt/physical/predicate_collector.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#include "predicate_collector.h"
22

3-
#include <ydb/core/formats/arrow/ssa_runtime_version.h>
43
#include <yql/essentials/core/yql_opt_utils.h>
54
#include <yql/essentials/core/yql_expr_optimize.h>
65
#include <yql/essentials/utils/log/log.h>

ydb/core/kqp/provider/yql_kikimr_settings.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ struct TKikimrConfiguration : public TKikimrSettings, public NCommon::TSettingDi
190190
bool FilterPushdownOverJoinOptionalSide = false;
191191
THashSet<TString> YqlCoreOptimizerFlags;
192192
bool EnableSpillingInHashJoinShuffleConnections = false;
193+
bool EnableOlapScalarApply = false;
193194

194195
NDq::EHashShuffleFuncType DefaultHashShuffleFuncType = NDq::EHashShuffleFuncType::HashV1;
195196
NDq::EHashShuffleFuncType DefaultColumnShardHashShuffleFuncType = NDq::EHashShuffleFuncType::ColumnShardHashV1;

ydb/core/kqp/query_compiler/kqp_olap_compiler.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#include "kqp_olap_compiler.h"
22

33
#include <ydb/core/formats/arrow/arrow_helpers.h>
4-
#include <ydb/core/formats/arrow/ssa_runtime_version.h>
54
#include <ydb/library/formats/arrow/protos/ssa.pb.h>
65

76
#include <yql/essentials/core/arrow_kernels/request/request.h>
@@ -51,8 +50,6 @@ class TKqpOlapCompileContext {
5150
YQL_ENSURE(ReadColumns.emplace(columnMeta.Name, columnMeta.Id).second);
5251
MaxColumnId = std::max(MaxColumnId, columnMeta.Id);
5352
}
54-
55-
Program.SetVersion(NKikimr::NSsa::RuntimeVersion);
5653
}
5754

5855
ui32 GetColumnId(const std::string& name) const {

ydb/core/kqp/ut/olap/aggregations_ut.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#include <ydb/core/formats/arrow/ssa_runtime_version.h>
21

32
#include "helpers/aggregation.h"
43

ydb/core/kqp/ut/olap/kqp_olap_ut.cpp

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#include <ydb/core/formats/arrow/ssa_runtime_version.h>
2-
31
#include "helpers/get_value.h"
42
#include "helpers/query_executor.h"
53
#include "helpers/local.h"
@@ -1233,7 +1231,6 @@ Y_UNIT_TEST_SUITE(KqpOlap) {
12331231
//R"(`timestamp` >= Timestamp("1970-01-01T00:00:00.000001Z"))",
12341232
R"(`timestamp` >= Timestamp("1970-01-01T00:00:03.000001Z") AND `level` < 4)",
12351233
//R"((`timestamp`, `level`) >= (Timestamp("1970-01-01T00:00:03.000001Z"), 3))", //-- Started to break with bad kernel
1236-
#if SSA_RUNTIME_VERSION >= 5U
12371234
R"(`resource_id` != "10001" XOR "XXX" == "YYY")",
12381235
R"(IF(`level` > 3, -`level`, +`level`) < 2)",
12391236
R"(StartsWith(`message` ?? `resource_id`, "10000"))",
@@ -1242,7 +1239,6 @@ Y_UNIT_TEST_SUITE(KqpOlap) {
12421239
R"(ChooseMembers(TableRow(), ['level', 'uid', 'resource_id']) != <|level:1, uid:"uid_3000001", resource_id:"10001"|>)",
12431240
R"(`uid` LIKE "_id%000_")",
12441241
R"(`uid` ILIKE "UID%002")",
1245-
#endif
12461242
};
12471243

12481244
for (const auto& predicate: testData) {
@@ -1454,33 +1450,6 @@ Y_UNIT_TEST_SUITE(KqpOlap) {
14541450
UNIT_ASSERT_C(ast.find("KqpOlapFilter") != std::string::npos,
14551451
TStringBuilder() << "Predicate wasn't pushed down. Query: " << query);
14561452
}
1457-
#if SSA_RUNTIME_VERSION < 5U
1458-
Y_UNIT_TEST(PredicatePushdown_LikeNotPushedDownIfAnsiLikeDisabled) {
1459-
auto settings = TKikimrSettings()
1460-
.SetWithSampleTables(false);
1461-
TKikimrRunner kikimr(settings);
1462-
1463-
TStreamExecScanQuerySettings scanSettings;
1464-
scanSettings.Explain(true);
1465-
1466-
TTableWithNullsHelper(kikimr).CreateTableWithNulls();
1467-
WriteTestDataForTableWithNulls(kikimr, "/Root/tableWithNulls");
1468-
Tests::NCommon::TLoggerInit(kikimr).Initialize();
1469-
1470-
auto tableClient = kikimr.GetTableClient();
1471-
auto query = R"(
1472-
PRAGMA DisableAnsiLike;
1473-
SELECT id, resource_id FROM `/Root/tableWithNulls` WHERE resource_id LIKE "%5%"
1474-
)";
1475-
auto it = tableClient.StreamExecuteScanQuery(query, scanSettings).GetValueSync();
1476-
UNIT_ASSERT_C(it.IsSuccess(), it.GetIssues().ToString());
1477-
1478-
auto result = CollectStreamResult(it);
1479-
auto ast = result.QueryStats->Getquery_ast();
1480-
UNIT_ASSERT_C(ast.find("KqpOlapFilter") == std::string::npos,
1481-
TStringBuilder() << "Predicate pushed down. Query: " << query);
1482-
}
1483-
#endif
14841453
Y_UNIT_TEST(PredicatePushdown_MixStrictAndNotStrict) {
14851454
auto settings = TKikimrSettings()
14861455
.SetWithSampleTables(false);

0 commit comments

Comments
 (0)