summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorimunkin <[email protected]>2025-03-07 16:20:21 +0300
committerimunkin <[email protected]>2025-03-07 16:50:30 +0300
commit76b01477fe58824ce7e8abc56a203428395f3194 (patch)
tree192a83d7a804dcf48d72c4ad1f562d52aa942ccb
parent6f59e745851b310f4174ac914ea6a010b1c560df (diff)
YQL-19623: Drop MKQL support for runtime versions <47
commit_hash:c3dd409a2ec0caaca64dee4f4bd32335ff3e6c68
-rw-r--r--yql/essentials/minikql/comp_nodes/mkql_wide_combine.cpp22
-rw-r--r--yql/essentials/minikql/comp_nodes/ut/mkql_wide_combine_ut.cpp6
-rw-r--r--yql/essentials/minikql/mkql_program_builder.cpp29
3 files changed, 11 insertions, 46 deletions
diff --git a/yql/essentials/minikql/comp_nodes/mkql_wide_combine.cpp b/yql/essentials/minikql/comp_nodes/mkql_wide_combine.cpp
index 4e5f467696d..85b4151d18d 100644
--- a/yql/essentials/minikql/comp_nodes/mkql_wide_combine.cpp
+++ b/yql/essentials/minikql/comp_nodes/mkql_wide_combine.cpp
@@ -1975,24 +1975,16 @@ IComputationNode* WrapWideCombinerT(TCallable& callable, const TComputationNodeF
allowSpilling
);
} else {
- if constexpr (RuntimeVersion < 46U) {
- const auto memLimit = AS_VALUE(TDataLiteral, callable.GetInput(1U))->AsValue().Get<ui64>();
+ if (const auto memLimit = AS_VALUE(TDataLiteral, callable.GetInput(1U))->AsValue().Get<i64>(); memLimit >= 0)
if (EGraphPerProcess::Single == ctx.GraphPerProcess)
- return new TWideCombinerWrapper<true, false>(ctx.Mutables, wide, std::move(nodes), std::move(keyTypes), memLimit);
+ return new TWideCombinerWrapper<true, false>(ctx.Mutables, wide, std::move(nodes), std::move(keyTypes), ui64(memLimit));
else
- return new TWideCombinerWrapper<false, false>(ctx.Mutables, wide, std::move(nodes), std::move(keyTypes), memLimit);
- } else {
- if (const auto memLimit = AS_VALUE(TDataLiteral, callable.GetInput(1U))->AsValue().Get<i64>(); memLimit >= 0)
- if (EGraphPerProcess::Single == ctx.GraphPerProcess)
- return new TWideCombinerWrapper<true, false>(ctx.Mutables, wide, std::move(nodes), std::move(keyTypes), ui64(memLimit));
- else
- return new TWideCombinerWrapper<false, false>(ctx.Mutables, wide, std::move(nodes), std::move(keyTypes), ui64(memLimit));
+ return new TWideCombinerWrapper<false, false>(ctx.Mutables, wide, std::move(nodes), std::move(keyTypes), ui64(memLimit));
+ else
+ if (EGraphPerProcess::Single == ctx.GraphPerProcess)
+ return new TWideCombinerWrapper<true, true>(ctx.Mutables, wide, std::move(nodes), std::move(keyTypes), ui64(-memLimit));
else
- if (EGraphPerProcess::Single == ctx.GraphPerProcess)
- return new TWideCombinerWrapper<true, true>(ctx.Mutables, wide, std::move(nodes), std::move(keyTypes), ui64(-memLimit));
- else
- return new TWideCombinerWrapper<false, true>(ctx.Mutables, wide, std::move(nodes), std::move(keyTypes), ui64(-memLimit));
- }
+ return new TWideCombinerWrapper<false, true>(ctx.Mutables, wide, std::move(nodes), std::move(keyTypes), ui64(-memLimit));
}
}
diff --git a/yql/essentials/minikql/comp_nodes/ut/mkql_wide_combine_ut.cpp b/yql/essentials/minikql/comp_nodes/ut/mkql_wide_combine_ut.cpp
index 76c55a8fdc6..49e292d8eb9 100644
--- a/yql/essentials/minikql/comp_nodes/ut/mkql_wide_combine_ut.cpp
+++ b/yql/essentials/minikql/comp_nodes/ut/mkql_wide_combine_ut.cpp
@@ -462,7 +462,7 @@ Y_UNIT_TEST_SUITE(TMiniKQLWideCombinerTest) {
UNIT_ASSERT(!iterator.Next(item));
UNIT_ASSERT(!iterator.Next(item));
}
-#if !defined(MKQL_RUNTIME_VERSION) || MKQL_RUNTIME_VERSION >= 46u
+
Y_UNIT_TEST_LLVM(TestHasLimitButPasstroughtYields) {
TTestStreamParams params;
params.TestYieldStreamData = {0, 1, 0, 2, TTestStreamParams::Yield, 0, TTestStreamParams::Yield, 1, 2, 0, 1, 3, 0, TTestStreamParams::Yield, 1, 2};
@@ -495,8 +495,7 @@ Y_UNIT_TEST_SUITE(TMiniKQLWideCombinerTest) {
UNIT_ASSERT_EQUAL(streamVal.Fetch(result), NUdf::EFetchStatus::Finish);
UNIT_ASSERT_EQUAL(streamVal.Fetch(result), NUdf::EFetchStatus::Finish);
}
-#endif
-#if !defined(MKQL_RUNTIME_VERSION) || MKQL_RUNTIME_VERSION >= 46u
+
Y_UNIT_TEST_LLVM(TestSkipYieldRespectsMemLimit) {
TTestStreamParams params;
params.StringSize = 50000;
@@ -529,7 +528,6 @@ Y_UNIT_TEST_SUITE(TMiniKQLWideCombinerTest) {
UNIT_ASSERT_EQUAL(streamVal.Fetch(result), NUdf::EFetchStatus::Finish);
UNIT_ASSERT_EQUAL(streamVal.Fetch(result), NUdf::EFetchStatus::Finish);
}
-#endif
}
Y_UNIT_TEST_SUITE(TMiniKQLWideCombinerPerfTest) {
diff --git a/yql/essentials/minikql/mkql_program_builder.cpp b/yql/essentials/minikql/mkql_program_builder.cpp
index 825f46dd943..85b401b99a2 100644
--- a/yql/essentials/minikql/mkql_program_builder.cpp
+++ b/yql/essentials/minikql/mkql_program_builder.cpp
@@ -20,7 +20,7 @@ using namespace std::string_view_literals;
namespace NKikimr {
namespace NMiniKQL {
-static_assert(RuntimeVersion >= 40);
+static_assert(RuntimeVersion >= 47U);
namespace {
@@ -1554,10 +1554,6 @@ TRuntimeNode TProgramBuilder::AsScalar(TRuntimeNode value) {
}
TRuntimeNode TProgramBuilder::ReplicateScalar(TRuntimeNode value, TRuntimeNode count) {
- if constexpr (RuntimeVersion < 43U) {
- THROW yexception() << "Runtime version (" << RuntimeVersion << ") too old for " << __func__;
- }
-
auto valueType = AS_TYPE(TBlockType, value.GetStaticType());
auto countType = AS_TYPE(TBlockType, count.GetStaticType());
@@ -4617,12 +4613,6 @@ TRuntimeNode TProgramBuilder::CommonJoinCore(TRuntimeNode flow, EJoinKind joinKi
}
TRuntimeNode TProgramBuilder::WideCombiner(TRuntimeNode flow, i64 memLimit, const TWideLambda& extractor, const TBinaryWideLambda& init, const TTernaryWideLambda& update, const TBinaryWideLambda& finish) {
- if (memLimit < 0) {
- if constexpr (RuntimeVersion < 46U) {
- THROW yexception() << "Runtime version (" << RuntimeVersion << ") too old for " << __func__ << " with limit " << memLimit;
- }
- }
-
const auto wideComponents = GetWideComponents(AS_TYPE(TFlowType, flow.GetStaticType()));
TRuntimeNode::TList itemArgs;
@@ -4662,10 +4652,7 @@ TRuntimeNode TProgramBuilder::WideCombiner(TRuntimeNode flow, i64 memLimit, cons
TCallableBuilder callableBuilder(Env, __func__, NewFlowType(NewMultiType(tupleItems)));
callableBuilder.Add(flow);
- if constexpr (RuntimeVersion < 46U)
- callableBuilder.Add(NewDataLiteral(ui64(memLimit)));
- else
- callableBuilder.Add(NewDataLiteral(memLimit));
+ callableBuilder.Add(NewDataLiteral(memLimit));
callableBuilder.Add(NewDataLiteral(ui32(keyArgs.size())));
callableBuilder.Add(NewDataLiteral(ui32(stateArgs.size())));
std::for_each(itemArgs.cbegin(), itemArgs.cend(), std::bind(&TCallableBuilder::Add, std::ref(callableBuilder), std::placeholders::_1));
@@ -5366,10 +5353,6 @@ TRuntimeNode TProgramBuilder::PgConst(TPgType* pgType, const std::string_view& v
TRuntimeNode TProgramBuilder::PgResolvedCall(bool useContext, const std::string_view& name,
ui32 id, const TArrayRef<const TRuntimeNode>& args,
TType* returnType, bool rangeFunction) {
- if constexpr (RuntimeVersion < 45U) {
- THROW yexception() << "Runtime version (" << RuntimeVersion << ") too old for " << __func__;
- }
-
TCallableBuilder callableBuilder(Env, __func__, returnType);
callableBuilder.Add(NewDataLiteral(useContext));
callableBuilder.Add(NewDataLiteral(rangeFunction));
@@ -5405,10 +5388,6 @@ TRuntimeNode TProgramBuilder::PgTableContent(
const std::string_view& cluster,
const std::string_view& table,
TType* returnType) {
- if constexpr (RuntimeVersion < 47U) {
- THROW yexception() << "Runtime version (" << RuntimeVersion << ") too old for " << __func__;
- }
-
TCallableBuilder callableBuilder(Env, __func__, returnType);
callableBuilder.Add(NewDataLiteral<NUdf::EDataSlot::String>(cluster));
callableBuilder.Add(NewDataLiteral<NUdf::EDataSlot::String>(table));
@@ -5904,8 +5883,6 @@ TRuntimeNode TProgramBuilder::MatchRecognizeCore(
const NYql::NMatchRecognize::TAfterMatchSkipTo& skipTo,
NYql::NMatchRecognize::ERowsPerMatch rowsPerMatch
) {
- MKQL_ENSURE(RuntimeVersion >= 42, "MatchRecognize is not supported in runtime version " << RuntimeVersion);
-
const auto inputRowType = AS_TYPE(TStructType, AS_TYPE(TFlowType, inputStream.GetStaticType())->GetItemType());
const auto inputRowArg = Arg(inputRowType);
const auto partitionKeySelectorNode = getPartitionKeySelectorNode(inputRowArg);
@@ -6092,8 +6069,6 @@ TRuntimeNode TProgramBuilder::TimeOrderRecover(
TRuntimeNode rowLimit
)
{
- MKQL_ENSURE(RuntimeVersion >= 44, "TimeOrderRecover is not supported in runtime version " << RuntimeVersion);
-
auto& inputRowType = *static_cast<TStructType*>(AS_TYPE(TStructType, AS_TYPE(TFlowType, inputStream.GetStaticType())->GetItemType()));
const auto inputRowArg = Arg(&inputRowType);
TStructTypeBuilder outputRowTypeBuilder(Env);