diff options
author | imunkin <imunkin@yandex-team.com> | 2025-03-04 12:31:00 +0300 |
---|---|---|
committer | imunkin <imunkin@yandex-team.com> | 2025-03-04 12:50:35 +0300 |
commit | adb5fe0f23f50f6ad4ce8b9492e496dd4628e95c (patch) | |
tree | be1477a6ec13ba562a758ffc83201d4a4744f3ff | |
parent | d8a124a50d0c6f85ff252c02db51c4e648c55cf2 (diff) | |
download | ydb-adb5fe0f23f50f6ad4ce8b9492e496dd4628e95c.tar.gz |
YQL-19623: Drop MKQL support for runtime versions <20
commit_hash:78108621c2faeeedc8d1d2aba988e271d339575c
15 files changed, 27 insertions, 140 deletions
diff --git a/yql/essentials/minikql/comp_nodes/ut/mkql_flatmap_ut.cpp b/yql/essentials/minikql/comp_nodes/ut/mkql_flatmap_ut.cpp index 12c11e4813..e8282e94d7 100644 --- a/yql/essentials/minikql/comp_nodes/ut/mkql_flatmap_ut.cpp +++ b/yql/essentials/minikql/comp_nodes/ut/mkql_flatmap_ut.cpp @@ -522,7 +522,7 @@ Y_UNIT_TEST_SUITE(TMiniKQLFlatMapTest) { UNIT_ASSERT(!iterator.Next(item)); UNIT_ASSERT(!iterator.Next(item)); } -#if !defined(MKQL_RUNTIME_VERSION) || MKQL_RUNTIME_VERSION >= 18u + Y_UNIT_TEST_LLVM(TestNarrowWithList) { TSetup<LLVM> setup; TProgramBuilder& pb = *setup.PgmBuilder; @@ -846,7 +846,6 @@ Y_UNIT_TEST_SUITE(TMiniKQLFlatMapTest) { UNIT_ASSERT_VALUES_EQUAL(NUdf::EFetchStatus::Finish, iterator.Fetch(item)); UNIT_ASSERT_VALUES_EQUAL(NUdf::EFetchStatus::Finish, iterator.Fetch(item)); } -#endif } } diff --git a/yql/essentials/minikql/comp_nodes/ut/mkql_join_ut.cpp b/yql/essentials/minikql/comp_nodes/ut/mkql_join_ut.cpp index d404644972..3731ff1539 100644 --- a/yql/essentials/minikql/comp_nodes/ut/mkql_join_ut.cpp +++ b/yql/essentials/minikql/comp_nodes/ut/mkql_join_ut.cpp @@ -116,7 +116,7 @@ Y_UNIT_TEST_SUITE(TMiniKQLCommonJoinCoreTupleTest) { UNIT_ASSERT(!iterator.Next(item)); } } -#if !defined(MKQL_RUNTIME_VERSION) || MKQL_RUNTIME_VERSION >= 18u + Y_UNIT_TEST_SUITE(TMiniKQLCommonJoinCoreWideTest) { Y_UNIT_TEST_LLVM(Inner) { TSetup<LLVM> setup; @@ -323,7 +323,7 @@ Y_UNIT_TEST_SUITE(TMiniKQLCommonJoinCoreWideTest) { UNIT_ASSERT(!iterator.Next(item)); } } -#endif + } } diff --git a/yql/essentials/minikql/comp_nodes/ut/mkql_map_join_ut.cpp b/yql/essentials/minikql/comp_nodes/ut/mkql_map_join_ut.cpp index e68d4bd46e..fe734804ea 100644 --- a/yql/essentials/minikql/comp_nodes/ut/mkql_map_join_ut.cpp +++ b/yql/essentials/minikql/comp_nodes/ut/mkql_map_join_ut.cpp @@ -585,7 +585,7 @@ Y_UNIT_TEST_SUITE(TMiniKQLMapJoinCoreTest) { } } } -#if !defined(MKQL_RUNTIME_VERSION) || MKQL_RUNTIME_VERSION >= 18u + Y_UNIT_TEST_SUITE(TMiniKQLWideMapJoinCoreTest) { Y_UNIT_TEST_LLVM(TestInner) { for (ui32 pass = 0; pass < 1; ++pass) { @@ -1144,7 +1144,7 @@ Y_UNIT_TEST_SUITE(TMiniKQLWideMapJoinCoreTest) { } } } -#endif + } } diff --git a/yql/essentials/minikql/comp_nodes/ut/mkql_multimap_ut.cpp b/yql/essentials/minikql/comp_nodes/ut/mkql_multimap_ut.cpp index 5dcb30db2e..d6735151f6 100644 --- a/yql/essentials/minikql/comp_nodes/ut/mkql_multimap_ut.cpp +++ b/yql/essentials/minikql/comp_nodes/ut/mkql_multimap_ut.cpp @@ -121,7 +121,7 @@ Y_UNIT_TEST_SUITE(TMiniKQLMultiMapTest) { UNIT_ASSERT(!iterator.Next(item)); UNIT_ASSERT(!iterator.Next(item)); } -#if !defined(MKQL_RUNTIME_VERSION) || MKQL_RUNTIME_VERSION >= 18u + Y_UNIT_TEST_LLVM(TestFlattenByNarrow) { TSetup<LLVM> setup; TProgramBuilder& pb = *setup.PgmBuilder; @@ -164,7 +164,6 @@ Y_UNIT_TEST_SUITE(TMiniKQLMultiMapTest) { UNIT_ASSERT(!iterator.Next(item)); UNIT_ASSERT(!iterator.Next(item)); } -#endif } } diff --git a/yql/essentials/minikql/comp_nodes/ut/mkql_wide_chopper_ut.cpp b/yql/essentials/minikql/comp_nodes/ut/mkql_wide_chopper_ut.cpp index 554dd8a3d3..95ce34a54c 100644 --- a/yql/essentials/minikql/comp_nodes/ut/mkql_wide_chopper_ut.cpp +++ b/yql/essentials/minikql/comp_nodes/ut/mkql_wide_chopper_ut.cpp @@ -3,7 +3,7 @@ namespace NKikimr { namespace NMiniKQL { -#if !defined(MKQL_RUNTIME_VERSION) || MKQL_RUNTIME_VERSION >= 18u + Y_UNIT_TEST_SUITE(TMiniKQLWideChopperTest) { Y_UNIT_TEST_LLVM(TestConcatKeyToItems) { TSetup<LLVM> setup; @@ -468,7 +468,7 @@ Y_UNIT_TEST_SUITE(TMiniKQLWideChopperTest) { UNIT_ASSERT(!iterator.Next(item)); } } -#endif + } } 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 55cb6babbf..4e4d13163c 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 @@ -155,7 +155,6 @@ void CheckIfStreamHasExpectedStringValues(const NUdf::TUnboxedValue& streamValue } // unnamed -#if !defined(MKQL_RUNTIME_VERSION) || MKQL_RUNTIME_VERSION >= 18u Y_UNIT_TEST_SUITE(TMiniKQLWideCombinerTest) { Y_UNIT_TEST_LLVM(TestLongStringsRefCounting) { TSetup<LLVM> setup; @@ -1065,7 +1064,7 @@ Y_UNIT_TEST_SUITE(TMiniKQLWideCombinerPerfTest) { Cerr << "Runtime is " << t2 - t1 << " vs C++ " << cppTime << Endl; } } -#endif + #if !defined(MKQL_RUNTIME_VERSION) || MKQL_RUNTIME_VERSION >= 29u Y_UNIT_TEST_SUITE(TMiniKQLWideLastCombinerTest) { Y_UNIT_TEST_LLVM_SPILLING(TestLongStringsRefCounting) { diff --git a/yql/essentials/minikql/comp_nodes/ut/mkql_wide_condense_ut.cpp b/yql/essentials/minikql/comp_nodes/ut/mkql_wide_condense_ut.cpp index b231df462b..1313812732 100644 --- a/yql/essentials/minikql/comp_nodes/ut/mkql_wide_condense_ut.cpp +++ b/yql/essentials/minikql/comp_nodes/ut/mkql_wide_condense_ut.cpp @@ -3,7 +3,7 @@ namespace NKikimr { namespace NMiniKQL { -#if !defined(MKQL_RUNTIME_VERSION) || MKQL_RUNTIME_VERSION >= 18u + Y_UNIT_TEST_SUITE(TMiniKQLWideCondense1Test) { Y_UNIT_TEST_LLVM(TestConcatItemsToKey) { TSetup<LLVM> setup; @@ -167,7 +167,7 @@ Y_UNIT_TEST_SUITE(TMiniKQLWideCondense1Test) { UNIT_ASSERT(!iterator.Next(item)); } } -#endif + } } diff --git a/yql/essentials/minikql/comp_nodes/ut/mkql_wide_filter_ut.cpp b/yql/essentials/minikql/comp_nodes/ut/mkql_wide_filter_ut.cpp index 15c8516089..fd7b3f2f23 100644 --- a/yql/essentials/minikql/comp_nodes/ut/mkql_wide_filter_ut.cpp +++ b/yql/essentials/minikql/comp_nodes/ut/mkql_wide_filter_ut.cpp @@ -3,7 +3,7 @@ namespace NKikimr { namespace NMiniKQL { -#if !defined(MKQL_RUNTIME_VERSION) || MKQL_RUNTIME_VERSION >= 18u + Y_UNIT_TEST_SUITE(TMiniKQLWideFilterTest) { Y_UNIT_TEST_LLVM(TestPredicateExpression) { TSetup<LLVM> setup; @@ -381,6 +381,6 @@ Y_UNIT_TEST_SUITE(TMiniKQLWideFilterTest) { UNIT_ASSERT(!iterator.Next(item)); } } -#endif + } } diff --git a/yql/essentials/minikql/comp_nodes/ut/mkql_wide_map_ut.cpp b/yql/essentials/minikql/comp_nodes/ut/mkql_wide_map_ut.cpp index d1afec27f4..97c7d82d7b 100644 --- a/yql/essentials/minikql/comp_nodes/ut/mkql_wide_map_ut.cpp +++ b/yql/essentials/minikql/comp_nodes/ut/mkql_wide_map_ut.cpp @@ -3,7 +3,7 @@ namespace NKikimr { namespace NMiniKQL { -#if !defined(MKQL_RUNTIME_VERSION) || MKQL_RUNTIME_VERSION >= 18u + Y_UNIT_TEST_SUITE(TMiniKQLWideMapTest) { Y_UNIT_TEST_LLVM(TestSimpleSwap) { TSetup<LLVM> setup; @@ -330,6 +330,6 @@ Y_UNIT_TEST_SUITE(TMiniKQLWideMapTest) { UNIT_ASSERT(!iterator.Next(item)); } } -#endif + } } diff --git a/yql/essentials/minikql/comp_nodes/ut/mkql_wide_nodes_ut.cpp b/yql/essentials/minikql/comp_nodes/ut/mkql_wide_nodes_ut.cpp index 093810f0bc..1cbe7d774b 100644 --- a/yql/essentials/minikql/comp_nodes/ut/mkql_wide_nodes_ut.cpp +++ b/yql/essentials/minikql/comp_nodes/ut/mkql_wide_nodes_ut.cpp @@ -3,7 +3,7 @@ namespace NKikimr { namespace NMiniKQL { -#if !defined(MKQL_RUNTIME_VERSION) || MKQL_RUNTIME_VERSION >= 18u + Y_UNIT_TEST_SUITE(TMiniKQLWideNodesTest) { // TDOD: fixme #if 0 @@ -119,6 +119,6 @@ Y_UNIT_TEST_SUITE(TMiniKQLWideNodesTest) { } } -#endif + } } diff --git a/yql/essentials/minikql/mkql_program_builder.cpp b/yql/essentials/minikql/mkql_program_builder.cpp index 3c1fa669f8..e03a5e3b28 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 >= 10); +static_assert(RuntimeVersion >= 20); namespace { @@ -405,10 +405,6 @@ TRuntimeNode TProgramBuilder::Arg(TType* type) const { } TRuntimeNode TProgramBuilder::WideFlowArg(TType* type) const { - if constexpr (RuntimeVersion < 18U) { - THROW yexception() << "Runtime version (" << RuntimeVersion << ") too old for " << __func__; - } - TCallableBuilder builder(Env, __func__, type, true); return TRuntimeNode(builder.Build(), false); } @@ -975,10 +971,6 @@ TRuntimeNode TProgramBuilder::ToList(TRuntimeNode optional) { } TRuntimeNode TProgramBuilder::Iterable(TZeroLambda lambda) { - if constexpr (RuntimeVersion < 19U) { - THROW yexception() << "Runtime version (" << RuntimeVersion << ") too old for " << __func__; - } - const auto itemArg = Arg(NewNull().GetStaticType()); auto lambdaRes = lambda(); const auto resultType = NewListType(AS_TYPE(TStreamType, lambdaRes.GetStaticType())->GetItemType()); @@ -2985,10 +2977,6 @@ TRuntimeNode TProgramBuilder::SourceOf(TType* returnType) { } TRuntimeNode TProgramBuilder::Source() { - if constexpr (RuntimeVersion < 18U) { - THROW yexception() << "Runtime version (" << RuntimeVersion << ") too old for " << __func__; - } - TCallableBuilder callableBuilder(Env, __func__, NewFlowType(NewMultiType({}))); return TRuntimeNode(callableBuilder.Build(), false); } @@ -3163,9 +3151,7 @@ TRuntimeNode TProgramBuilder::QueueCreate(TRuntimeNode initCapacity, TRuntimeNod auto resType = AS_TYPE(TResourceType, returnType); const auto tag = resType->GetTag(); - if (initCapacity.GetStaticType()->IsVoid()) { - MKQL_ENSURE(RuntimeVersion >= 13, "Unbounded queue is not supported in runtime version " << RuntimeVersion); - } else { + if (!initCapacity.GetStaticType()->IsVoid()) { auto initCapacityType = AS_TYPE(TDataType, initCapacity); MKQL_ENSURE(initCapacityType->GetSchemeType() == NUdf::TDataType<ui64>::Id, "init capcity must be ui64"); } @@ -3219,8 +3205,6 @@ TRuntimeNode TProgramBuilder::QueuePeek(TRuntimeNode resource, TRuntimeNode inde } TRuntimeNode TProgramBuilder::QueueRange(TRuntimeNode resource, TRuntimeNode begin, TRuntimeNode end, const TArrayRef<const TRuntimeNode>& dependentNodes, TType* returnType) { - MKQL_ENSURE(RuntimeVersion >= 14, "QueueRange is not supported in runtime version " << RuntimeVersion); - MKQL_ENSURE(returnType->IsList(), "Expected list type as result of QueueRange"); auto resType = AS_TYPE(TResourceType, resource); @@ -3257,8 +3241,6 @@ TRuntimeNode TProgramBuilder::PreserveStream(TRuntimeNode stream, TRuntimeNode q } TRuntimeNode TProgramBuilder::Seq(const TArrayRef<const TRuntimeNode>& args, TType* returnType) { - MKQL_ENSURE(RuntimeVersion >= 15, "Seq is not supported in runtime version " << RuntimeVersion); - TCallableBuilder callableBuilder(Env, __func__, returnType); for (auto node : args) { callableBuilder.Add(node); @@ -3704,16 +3686,6 @@ TRuntimeNode TProgramBuilder::BuildFlatMap(const std::string_view& callableName, TRuntimeNode TProgramBuilder::MultiMap(TRuntimeNode list, const TExpandLambda& handler) { - if constexpr (RuntimeVersion < 16U) { - const auto single = [=](TRuntimeNode item) -> TRuntimeNode { - const auto newList = handler(item); - const auto retItemType = newList.front().GetStaticType(); - MKQL_ENSURE(retItemType->IsSameType(*newList.back().GetStaticType()), "Must be same type."); - return NewList(retItemType, newList); - }; - return OrderedFlatMap(list, single); - } - const auto listType = list.GetStaticType(); MKQL_ENSURE(listType->IsFlow() || listType->IsList(), "Expected flow, list, stream or optional"); @@ -3736,10 +3708,6 @@ TRuntimeNode TProgramBuilder::MultiMap(TRuntimeNode list, const TExpandLambda& h } TRuntimeNode TProgramBuilder::NarrowMultiMap(TRuntimeNode flow, const TWideLambda& handler) { - if constexpr (RuntimeVersion < 18U) { - THROW yexception() << "Runtime version (" << RuntimeVersion << ") too old for " << __func__; - } - const auto wideComponents = GetWideComponents(AS_TYPE(TFlowType, flow.GetStaticType())); TRuntimeNode::TList itemArgs; @@ -3761,10 +3729,6 @@ TRuntimeNode TProgramBuilder::NarrowMultiMap(TRuntimeNode flow, const TWideLambd } TRuntimeNode TProgramBuilder::ExpandMap(TRuntimeNode flow, const TExpandLambda& handler) { - if constexpr (RuntimeVersion < 18U) { - THROW yexception() << "Runtime version (" << RuntimeVersion << ") too old for " << __func__; - } - const auto itemType = AS_TYPE(TFlowType, flow.GetStaticType())->GetItemType(); const auto itemArg = Arg(itemType); const auto newItems = handler(itemArg); @@ -3781,10 +3745,6 @@ TRuntimeNode TProgramBuilder::ExpandMap(TRuntimeNode flow, const TExpandLambda& } TRuntimeNode TProgramBuilder::WideMap(TRuntimeNode flow, const TWideLambda& handler) { - if constexpr (RuntimeVersion < 18U) { - THROW yexception() << "Runtime version (" << RuntimeVersion << ") too old for " << __func__; - } - const auto wideComponents = GetWideComponents(AS_TYPE(TFlowType, flow.GetStaticType())); TRuntimeNode::TList itemArgs; @@ -3841,10 +3801,6 @@ TRuntimeNode TProgramBuilder::WideChain1Map(TRuntimeNode flow, const TWideLambda } TRuntimeNode TProgramBuilder::NarrowMap(TRuntimeNode flow, const TNarrowLambda& handler) { - if constexpr (RuntimeVersion < 18U) { - THROW yexception() << "Runtime version (" << RuntimeVersion << ") too old for " << __func__; - } - const auto wideComponents = GetWideComponents(AS_TYPE(TFlowType, flow.GetStaticType())); TRuntimeNode::TList itemArgs; @@ -3862,10 +3818,6 @@ TRuntimeNode TProgramBuilder::NarrowMap(TRuntimeNode flow, const TNarrowLambda& } TRuntimeNode TProgramBuilder::NarrowFlatMap(TRuntimeNode flow, const TNarrowLambda& handler) { - if constexpr (RuntimeVersion < 18U) { - THROW yexception() << "Runtime version (" << RuntimeVersion << ") too old for " << __func__; - } - const auto wideComponents = GetWideComponents(AS_TYPE(TFlowType, flow.GetStaticType())); TRuntimeNode::TList itemArgs; @@ -3897,10 +3849,6 @@ TRuntimeNode TProgramBuilder::NarrowFlatMap(TRuntimeNode flow, const TNarrowLamb } TRuntimeNode TProgramBuilder::BuildWideFilter(const std::string_view& callableName, TRuntimeNode flow, const TNarrowLambda& handler) { - if constexpr (RuntimeVersion < 18U) { - THROW yexception() << "Runtime version (" << RuntimeVersion << ") too old for " << __func__; - } - const auto wideComponents = GetWideComponents(AS_TYPE(TFlowType, flow.GetStaticType())); TRuntimeNode::TList itemArgs; @@ -4324,12 +4272,11 @@ TRuntimeNode TProgramBuilder::Callable(TType* callableType, const TArrayLambda& } TRuntimeNode TProgramBuilder::NewNull() { - if (!UseNullType || RuntimeVersion < 11) { - TCallableBuilder callableBuilder(Env, "Null", NewOptionalType(Env.GetVoidLazy()->GetType())); - return TRuntimeNode(callableBuilder.Build(), false); - } else { + if (UseNullType) { return TRuntimeNode(Env.GetNullLazy(), true); } + TCallableBuilder callableBuilder(Env, "Null", NewOptionalType(Env.GetVoidLazy()->GetType())); + return TRuntimeNode(callableBuilder.Build(), false); } TRuntimeNode TProgramBuilder::Concat(TRuntimeNode data1, TRuntimeNode data2) { @@ -4362,18 +4309,10 @@ TRuntimeNode TProgramBuilder::RFind(TRuntimeNode haystack, TRuntimeNode needle, } TRuntimeNode TProgramBuilder::StartsWith(TRuntimeNode string, TRuntimeNode prefix) { - if constexpr (RuntimeVersion < 19U) { - THROW yexception() << "Runtime version (" << RuntimeVersion << ") too old for " << __func__; - } - return DataCompare(__func__, string, prefix); } TRuntimeNode TProgramBuilder::EndsWith(TRuntimeNode string, TRuntimeNode suffix) { - if constexpr (RuntimeVersion < 19U) { - THROW yexception() << "Runtime version (" << RuntimeVersion << ") too old for " << __func__; - } - return DataCompare(__func__, string, suffix); } @@ -4705,10 +4644,6 @@ TRuntimeNode TProgramBuilder::CommonJoinCore(TRuntimeNode flow, EJoinKind joinKi ui64 memLimit, std::optional<ui32> sortedTableOrder, EAnyJoinSettings anyJoinSettings, const ui32 tableIndexField, TType* returnType) { - if constexpr (RuntimeVersion < 17U) { - THROW yexception() << "Runtime version (" << RuntimeVersion << ") too old for " << __func__; - } - MKQL_ENSURE(leftColumns.size() % 2U == 0U, "Expected even count"); MKQL_ENSURE(rightColumns.size() % 2U == 0U, "Expected even count"); @@ -4755,10 +4690,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 constexpr (RuntimeVersion < 18U) { - THROW yexception() << "Runtime version (" << RuntimeVersion << ") too old for " << __func__; - } - if (memLimit < 0) { if constexpr (RuntimeVersion < 46U) { THROW yexception() << "Runtime version (" << RuntimeVersion << ") too old for " << __func__ << " with limit " << memLimit; @@ -4893,10 +4824,6 @@ TRuntimeNode TProgramBuilder::WideLastCombinerWithSpilling(TRuntimeNode flow, co } TRuntimeNode TProgramBuilder::WideCondense1(TRuntimeNode flow, const TWideLambda& init, const TWideSwitchLambda& switcher, const TBinaryWideLambda& update, bool useCtx) { - if constexpr (RuntimeVersion < 18U) { - THROW yexception() << "Runtime version (" << RuntimeVersion << ") too old for " << __func__; - } - const auto wideComponents = GetWideComponents(AS_TYPE(TFlowType, flow.GetStaticType())); TRuntimeNode::TList itemArgs; @@ -4992,10 +4919,6 @@ TRuntimeNode TProgramBuilder::GroupingCore(TRuntimeNode stream, const TUnaryLambda& keyExtractor, const TUnaryLambda& handler) { - if (handler && RuntimeVersion < 20U) { - THROW yexception() << "Runtime version (" << RuntimeVersion << ") too old for " << __func__ << " with handler"; - } - auto itemType = AS_TYPE(TStreamType, stream)->GetItemType(); TRuntimeNode keyExtractorItemArg = Arg(itemType); @@ -5067,10 +4990,6 @@ TRuntimeNode TProgramBuilder::Chopper(TRuntimeNode flow, const TUnaryLambda& key TRuntimeNode TProgramBuilder::WideChopper(TRuntimeNode flow, const TWideLambda& extractor, const TWideSwitchLambda& groupSwitch, const std::function<TRuntimeNode (TRuntimeNode::TList, TRuntimeNode)>& groupHandler ) { - if constexpr (RuntimeVersion < 18U) { - THROW yexception() << "Runtime version (" << RuntimeVersion << ") too old for " << __func__; - } - const auto wideComponents = GetWideComponents(AS_TYPE(TFlowType, flow.GetStaticType())); TRuntimeNode::TList itemArgs, keyArgs; diff --git a/yql/essentials/minikql/mkql_type_builder.cpp b/yql/essentials/minikql/mkql_type_builder.cpp index dfbdd3f89c..231231eee7 100644 --- a/yql/essentials/minikql/mkql_type_builder.cpp +++ b/yql/essentials/minikql/mkql_type_builder.cpp @@ -2650,12 +2650,11 @@ TType* TTypeBuilder::NewVoidType() const { } TType* TTypeBuilder::NewNullType() const { - if (!UseNullType || RuntimeVersion < 11) { - TCallableBuilder callableBuilder(Env, "Null", NewOptionalType(NewVoidType())); - return TRuntimeNode(callableBuilder.Build(), false).GetStaticType(); - } else { + if (UseNullType) { return TRuntimeNode(Env.GetNullLazy(), true).GetStaticType(); } + TCallableBuilder callableBuilder(Env, "Null", NewOptionalType(NewVoidType())); + return TRuntimeNode(callableBuilder.Build(), false).GetStaticType(); } TType* TTypeBuilder::NewEmptyStructType() const { diff --git a/yql/essentials/providers/common/mkql/yql_provider_mkql.cpp b/yql/essentials/providers/common/mkql/yql_provider_mkql.cpp index 123b59cc04..983bf85542 100644 --- a/yql/essentials/providers/common/mkql/yql_provider_mkql.cpp +++ b/yql/essentials/providers/common/mkql/yql_provider_mkql.cpp @@ -2236,22 +2236,12 @@ TMkqlCommonCallableCompiler::TShared::TShared() { AddCallable("EmptyList", [](const TExprNode& node, TMkqlBuildContext& ctx) { Y_UNUSED(node); - if (RuntimeVersion < 11) { - return ctx.ProgramBuilder.NewEmptyList(ctx.ProgramBuilder.NewVoid().GetStaticType()); - } else { - return TRuntimeNode(ctx.ProgramBuilder.GetTypeEnvironment().GetEmptyListLazy(), true); - } + return TRuntimeNode(ctx.ProgramBuilder.GetTypeEnvironment().GetEmptyListLazy(), true); }); AddCallable("EmptyDict", [](const TExprNode& node, TMkqlBuildContext& ctx) { Y_UNUSED(node); - if (RuntimeVersion < 11) { - auto voidType = ctx.ProgramBuilder.NewVoid().GetStaticType(); - auto dictType = ctx.ProgramBuilder.NewDictType(voidType, voidType, false); - return ctx.ProgramBuilder.NewDict(dictType, {}); - } else { - return TRuntimeNode(ctx.ProgramBuilder.GetTypeEnvironment().GetEmptyDictLazy(), true); - } + return TRuntimeNode(ctx.ProgramBuilder.GetTypeEnvironment().GetEmptyDictLazy(), true); }); AddCallable("SourceOf", [](const TExprNode& node, TMkqlBuildContext& ctx) { diff --git a/yql/essentials/providers/common/mkql/yql_type_mkql.cpp b/yql/essentials/providers/common/mkql/yql_type_mkql.cpp index cb001c847b..372ba7a98e 100644 --- a/yql/essentials/providers/common/mkql/yql_type_mkql.cpp +++ b/yql/essentials/providers/common/mkql/yql_type_mkql.cpp @@ -184,20 +184,10 @@ NKikimr::NMiniKQL::TType* BuildTypeImpl(const TTypeAnnotationNode& annotation, c } case ETypeAnnotationKind::EmptyList: { - if (NKikimr::NMiniKQL::RuntimeVersion < 11) { - auto voidType = typeBuilder.NewVoidType(); - return typeBuilder.NewListType(voidType); - } - return typeBuilder.GetTypeEnvironment().GetTypeOfEmptyListLazy(); } case ETypeAnnotationKind::EmptyDict: { - if constexpr(NKikimr::NMiniKQL::RuntimeVersion < 11) { - auto voidType = typeBuilder.NewVoidType(); - return typeBuilder.NewDictType(voidType, voidType, false); - } - return typeBuilder.GetTypeEnvironment().GetTypeOfEmptyDictLazy(); } diff --git a/yql/essentials/providers/common/schema/mkql/yql_mkql_schema.cpp b/yql/essentials/providers/common/schema/mkql/yql_mkql_schema.cpp index c172a0a09f..8273070925 100644 --- a/yql/essentials/providers/common/schema/mkql/yql_mkql_schema.cpp +++ b/yql/essentials/providers/common/schema/mkql/yql_mkql_schema.cpp @@ -192,17 +192,9 @@ struct TRuntimeTypeLoader { return Builder.GetTypeEnvironment().GetTypeOfTypeLazy(); } TMaybe<TType> LoadEmptyListType(ui32 /*level*/) { - if (NKikimr::NMiniKQL::RuntimeVersion < 11) { - return Builder.NewListType(Builder.NewVoid().GetStaticType()); - } - return Builder.GetTypeEnvironment().GetTypeOfEmptyListLazy(); } TMaybe<TType> LoadEmptyDictType(ui32 /*level*/) { - if (NKikimr::NMiniKQL::RuntimeVersion < 11) { - return Builder.NewDictType(Builder.NewVoid().GetStaticType(), Builder.NewVoid().GetStaticType(), false); - } - return Builder.GetTypeEnvironment().GetTypeOfEmptyDictLazy(); } TMaybe<TType> LoadDataType(const TString& dataType, ui32 /*level*/) { |