diff --git a/ydb/core/kqp/opt/peephole/kqp_opt_peephole.cpp b/ydb/core/kqp/opt/peephole/kqp_opt_peephole.cpp index bbb3dd54d221..abbb23f52b65 100644 --- a/ydb/core/kqp/opt/peephole/kqp_opt_peephole.cpp +++ b/ydb/core/kqp/opt/peephole/kqp_opt_peephole.cpp @@ -14,6 +14,7 @@ #include #include #include +#include #include #include @@ -181,6 +182,10 @@ class TKqpPeepholeFinalTransformer : public TOptimizeTransformerBase { } private: TMaybeNode SetCombinerMemoryLimit(TExprBase node, TExprContext& ctx) { + if (NMiniKQL::RuntimeVersion < 46U) { + return node; + } + if (const auto limit = node.Ref().Child(TCoWideCombiner::idx_MemLimit); limit->IsAtom("0")) { if (const auto limitSetting = Config->_KqpYqlCombinerMemoryLimit.Get(); limitSetting && *limitSetting) { return ctx.ChangeChild(node.Ref(), TCoWideCombiner::idx_MemLimit, ctx.RenameNode(*limit, ToString(-i64(*limitSetting)))); diff --git a/ydb/library/yql/minikql/comp_nodes/ut/mkql_blocks_ut.cpp b/ydb/library/yql/minikql/comp_nodes/ut/mkql_blocks_ut.cpp index ca4bb2e546c5..61e5dc0e7957 100644 --- a/ydb/library/yql/minikql/comp_nodes/ut/mkql_blocks_ut.cpp +++ b/ydb/library/yql/minikql/comp_nodes/ut/mkql_blocks_ut.cpp @@ -1,6 +1,7 @@ #include "mkql_computation_node_ut.h" #include +#include #include #include @@ -264,6 +265,10 @@ Y_UNIT_TEST(TestScalar) { } Y_UNIT_TEST_LLVM(TestReplicateScalar) { + if (RuntimeVersion < 43u) { + return; + } + const ui64 count = 1000; const ui32 value = 42; diff --git a/ydb/library/yql/minikql/comp_nodes/ut/mkql_wide_combine_ut.cpp b/ydb/library/yql/minikql/comp_nodes/ut/mkql_wide_combine_ut.cpp index 1984d7bde28e..884defdf971e 100644 --- a/ydb/library/yql/minikql/comp_nodes/ut/mkql_wide_combine_ut.cpp +++ b/ydb/library/yql/minikql/comp_nodes/ut/mkql_wide_combine_ut.cpp @@ -122,6 +122,10 @@ TRuntimeNode Combine(TProgramBuilder& pb, TRuntimeNode stream, std::function= 18u Y_UNIT_TEST_SUITE(TMiniKQLWideCombinerTest) { Y_UNIT_TEST_LLVM(TestLongStringsRefCounting) { + if (RuntimeVersion < 46u) { + return; + } + TSetup setup; TProgramBuilder& pb = *setup.PgmBuilder; @@ -199,6 +203,10 @@ Y_UNIT_TEST_SUITE(TMiniKQLWideCombinerTest) { } Y_UNIT_TEST_LLVM(TestLongStringsPasstroughtRefCounting) { + if (RuntimeVersion < 46u) { + return; + } + TSetup setup; TProgramBuilder& pb = *setup.PgmBuilder; @@ -274,6 +282,10 @@ Y_UNIT_TEST_SUITE(TMiniKQLWideCombinerTest) { } Y_UNIT_TEST_LLVM(TestDoNotCalculateUnusedInput) { + if (RuntimeVersion < 46u) { + return; + } + TSetup setup; TProgramBuilder& pb = *setup.PgmBuilder; @@ -427,8 +439,12 @@ 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) { + if (RuntimeVersion < 46u) { + return; + } + TSetup setup(GetNodeFactory()); TProgramBuilder& pb = *setup.PgmBuilder; @@ -458,7 +474,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/ydb/library/yql/minikql/mkql_program_builder.cpp b/ydb/library/yql/minikql/mkql_program_builder.cpp index c12742d9a606..1812a9dd5c5f 100644 --- a/ydb/library/yql/minikql/mkql_program_builder.cpp +++ b/ydb/library/yql/minikql/mkql_program_builder.cpp @@ -5493,9 +5493,11 @@ TRuntimeNode TProgramBuilder::PgConst(TPgType* pgType, const std::string_view& v TRuntimeNode TProgramBuilder::PgResolvedCall(bool useContext, const std::string_view& name, ui32 id, const TArrayRef& args, TType* returnType, bool rangeFunction) { - if constexpr (RuntimeVersion < 45U) { - THROW yexception() << "Runtime version (" << RuntimeVersion << ") too old for " << __func__; - } + + // Disable runtime compatibility checks for PG callables in 24-1 + // if constexpr (RuntimeVersion < 45U) { + // THROW yexception() << "Runtime version (" << RuntimeVersion << ") too old for " << __func__; + // } TCallableBuilder callableBuilder(Env, __func__, returnType); callableBuilder.Add(NewDataLiteral(useContext)); @@ -5540,9 +5542,11 @@ 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__; - } + + // Disable runtime compatibility checks for PG callables in 24-1 + // if constexpr (RuntimeVersion < 47U) { + // THROW yexception() << "Runtime version (" << RuntimeVersion << ") too old for " << __func__; + // } TCallableBuilder callableBuilder(Env, __func__, returnType); callableBuilder.Add(NewDataLiteral(cluster)); diff --git a/ydb/library/yql/minikql/mkql_runtime_version.h b/ydb/library/yql/minikql/mkql_runtime_version.h index e7f39f9b250b..ea538c42c4af 100644 --- a/ydb/library/yql/minikql/mkql_runtime_version.h +++ b/ydb/library/yql/minikql/mkql_runtime_version.h @@ -24,12 +24,22 @@ namespace NMiniKQL { // 1. Bump this version every time incompatible runtime nodes are introduced. // 2. Make sure you provide runtime node generation for previous runtime versions. #ifndef MKQL_RUNTIME_VERSION -#define MKQL_RUNTIME_VERSION 47U +#define MKQL_RUNTIME_VERSION 39U #endif // History: // v4 is the version supported by kikimr-19-6 // v14 is the version supported by kikimr-20-2 +// v14 is the version supported by kikimr-20-2 +// v21 is the version supported by kikimr-20-4 +// v21 is the version supported by kikimr-20-6 +// v23 is the version supported by kikimr-21-2 +// v24 is the version supported by kikimr-21-4 +// v29 is the version supported by kikimr-22-2 +// v30 is the version supported by kikimr-22-4 +// v32 is the version supported by kikimr-23-1 +// v39 is the version supported by kikimr-23-3 +// v47 is the version supported by kikimr-24-1 constexpr ui32 RuntimeVersion = MKQL_RUNTIME_VERSION; } diff --git a/ydb/library/yql/tests/s-expressions/common_file.py b/ydb/library/yql/tests/s-expressions/common_file.py index e17ada446df7..e1c7d337146f 100644 --- a/ydb/library/yql/tests/s-expressions/common_file.py +++ b/ydb/library/yql/tests/s-expressions/common_file.py @@ -68,6 +68,12 @@ def yqlrun_yt_results(provider, prepare, suite, case, config): def run_test(provider, prepare, suite, case, tmpdir, what): + if "TimeOrder" in suite: + pytest.skip('Unsupported in runtime version v39') + + if "SelfJoinCore" in case: + pytest.skip('Unsupported in runtime version v39') + if get_param('TARGET_PLATFORM'): if "ArcPython" in case: pytest.skip('ArcPython is not supported on non-default target platform')