diff options
author | Pavel Velikhov <pavelvelikhov@ydb.tech> | 2025-02-10 20:46:31 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-02-10 20:46:31 +0300 |
commit | e9ffe2e260af75c267b1c80464033258bd53a231 (patch) | |
tree | f735c553c3a19630d270ae1fa2ec6d375dd4e947 | |
parent | 81a727c7b9c35daab3892caa3b2cd17d59f3ead4 (diff) | |
download | ydb-e9ffe2e260af75c267b1c80464033258bd53a231.tar.gz |
Disabled pushing OLAP Apply with no arguments (#14351)
Co-authored-by: Pavel Velikhov <pavelvelikhov@localhost.localdomain>
-rw-r--r-- | ydb/core/kqp/opt/physical/kqp_opt_phy_olap_filter.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/ydb/core/kqp/opt/physical/kqp_opt_phy_olap_filter.cpp b/ydb/core/kqp/opt/physical/kqp_opt_phy_olap_filter.cpp index 5cbd2f3866..23a785b518 100644 --- a/ydb/core/kqp/opt/physical/kqp_opt_phy_olap_filter.cpp +++ b/ydb/core/kqp/opt/physical/kqp_opt_phy_olap_filter.cpp @@ -181,6 +181,11 @@ TMaybeNode<TExprBase> YqlApplyPushdown(const TExprBase& apply, const TExprNode& replacements.emplace(member.Get(), arguments.back()); } + // Temporary fix for https://st.yandex-team.ru/KIKIMR-22560 + if (!columns.size()) { + return nullptr; + } + return Build<TKqpOlapApply>(ctx, apply.Pos()) .Type(ExpandType(argument.Pos(), *argument.GetTypeAnn(), ctx)) .Columns().Add(std::move(columns)).Build() @@ -789,10 +794,15 @@ TExprBase KqpPushOlapFilter(TExprBase node, TExprContext& ctx, const TKqpOptimiz YQL_ENSURE(remainingPredicates.IsValid(), "Remaining predicates is invalid"); const auto pushedFilters = PredicatePushdown(TExprBase(predicatesToPush.ExprNode), lambdaArg, ctx, node.Pos()); - YQL_ENSURE(pushedFilters.IsValid(), "Pushed predicate should be always valid!"); + // Temporary fix for https://st.yandex-team.ru/KIKIMR-22560 + // YQL_ENSURE(pushedFilters.IsValid(), "Pushed predicate should be always valid!"); + + if (!pushedFilters.IsValid()) { + return node; + } TMaybeNode<TExprBase> olapFilter; - if (pushedFilters.FirstLevelOps.IsValid()) { + if (pushedFilters.FirstLevelOps.IsValid()) { olapFilter = Build<TKqpOlapFilter>(ctx, node.Pos()) .Input(read.Process().Body()) .Condition(pushedFilters.FirstLevelOps.Cast()) |