diff options
author | pilik <pudge1000-7@ydb.tech> | 2024-12-25 09:22:23 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-25 09:22:23 +0300 |
commit | 13c7b1798a3c35e00ad677c64e948f9fa50bf436 (patch) | |
tree | 4a7ea409a922e1d5ddbcba4710a74c78bf682291 | |
parent | 08abadd8bb7645cb03f829a6f9c3e127b19fd0b8 (diff) | |
download | ydb-13c7b1798a3c35e00ad677c64e948f9fa50bf436.tar.gz |
[KQP] OLAP output statistics fix (#12948)
Co-authored-by: Pavel Ivanov <pudge1000-7@qavm-9f0570a4.qemu>
-rw-r--r-- | ydb/core/kqp/opt/kqp_statistics_transformer.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/ydb/core/kqp/opt/kqp_statistics_transformer.cpp b/ydb/core/kqp/opt/kqp_statistics_transformer.cpp index 0bf72b718b..8ff060ee5e 100644 --- a/ydb/core/kqp/opt/kqp_statistics_transformer.cpp +++ b/ydb/core/kqp/opt/kqp_statistics_transformer.cpp @@ -467,10 +467,13 @@ public: resSelectivity = tmpSelectivity; } else if (auto notNode = input.Maybe<TKqpOlapNot>()) { resSelectivity = 1 - Compute(notNode.Cast().Value()); - } else if (input.Maybe<TCoAtomList>() && input.Ptr()->ChildrenSize() >= 1) { - auto listPtr = input.Maybe<TCoAtomList>().Cast().Ptr()->Child(1); + } else if ((input.Maybe<TCoList>() || input.Maybe<TCoAtomList>()) && input.Ptr()->ChildrenSize() >= 1) { + TExprNode::TPtr listPtr = input.Ptr(); + if (listPtr->ChildrenSize() >= 2 && listPtr->Child(0)->Content() == "??") { + listPtr = listPtr->Child(1); + } + size_t listSize = listPtr->ChildrenSize(); - if (listSize == 3) { TString compSign = TString(listPtr->Child(0)->Content()); TString attr = TString(listPtr->Child(1)->Content()); |