From b58aba5d191c128dd48e897fe9f5ae29b92d6277 Mon Sep 17 00:00:00 2001 From: Tony-Romanov <150126326+Tony-Romanov@users.noreply.github.com> Date: Fri, 5 Jul 2024 15:17:45 +0200 Subject: [PATCH 1/2] Fix pushdown JSON_EXISTS on runtime version 4. (#6332) --- ydb/core/kqp/query_compiler/kqp_olap_compiler.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ydb/core/kqp/query_compiler/kqp_olap_compiler.cpp b/ydb/core/kqp/query_compiler/kqp_olap_compiler.cpp index 5f6283824745..73d2fc836863 100644 --- a/ydb/core/kqp/query_compiler/kqp_olap_compiler.cpp +++ b/ydb/core/kqp/query_compiler/kqp_olap_compiler.cpp @@ -856,6 +856,8 @@ TTypedColumn GetOrCreateColumnIdAndType(const TExprBase& node, TKqpOlapCompileCo return BuildLogicalNot(maybeNot.Cast().Value(), ctx); } else if (const auto& maybeJsonValue = node.Maybe()) { return ConvertJsonValueToColumn(maybeJsonValue.Cast(), ctx); + } else if (const auto& maybeJsonValue = node.Maybe()) { + return CompileJsonExists(maybeJsonValue.Cast(), ctx); } else if (const auto& maybeApply = node.Maybe()) { return CompileYqlKernelScalarApply(maybeApply.Cast(), ctx); } From c67e5aa1e8a4cd01a69ea19282607cded31d4252 Mon Sep 17 00:00:00 2001 From: Tony-Romanov <150126326+Tony-Romanov@users.noreply.github.com> Date: Fri, 5 Jul 2024 12:30:42 +0200 Subject: [PATCH 2/2] Fix test of exotic XOR. (#6317) --- ydb/core/kqp/ut/olap/kqp_olap_ut.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ydb/core/kqp/ut/olap/kqp_olap_ut.cpp b/ydb/core/kqp/ut/olap/kqp_olap_ut.cpp index 5e5156178415..d116609b4726 100644 --- a/ydb/core/kqp/ut/olap/kqp_olap_ut.cpp +++ b/ydb/core/kqp/ut/olap/kqp_olap_ut.cpp @@ -939,7 +939,6 @@ Y_UNIT_TEST_SUITE(KqpOlap) { R"(`resource_id` = "10001")", R"(`resource_id` != "10001")", R"("XXX" == "YYY" OR `resource_id` != "10001")", - R"(`resource_id` != "10001" XOR "XXX" == "YYY")", R"(`level` = 1)", R"(`level` = Int8("1"))", R"(`level` = Int16("1"))", @@ -1021,6 +1020,7 @@ Y_UNIT_TEST_SUITE(KqpOlap) { R"((`timestamp`, `level`) >= (Timestamp("1970-01-01T00:00:03.000001Z"), 3))", #endif #if SSA_RUNTIME_VERSION >= 5U + R"(`resource_id` != "10001" XOR "XXX" == "YYY")", R"(IF(`level` > 3, -`level`, +`level`) < 2)", R"(StartsWith(`message` ?? `resource_id`, "10000"))", R"(NOT EndsWith(`message` ?? `resource_id`, "xxx"))",