diff options
author | ivanmorozov <ivanmorozov@yandex-team.com> | 2023-05-03 13:41:01 +0300 |
---|---|---|
committer | ivanmorozov <ivanmorozov@yandex-team.com> | 2023-05-03 13:41:01 +0300 |
commit | eb91f1a62f852fb3068571118aabb98909cbc606 (patch) | |
tree | 9cfca537ea3b5c35b6880d7bfd775256a7f2c0bd | |
parent | 2f1ea1c6577a0a24496ef74f28a9175e50eff1d0 (diff) | |
download | ydb-eb91f1a62f852fb3068571118aabb98909cbc606.tar.gz |
prevent optimized order policy for early filter not is full filter
-rw-r--r-- | ydb/core/tx/columnshard/engines/reader/read_metadata.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ydb/core/tx/columnshard/engines/reader/read_metadata.cpp b/ydb/core/tx/columnshard/engines/reader/read_metadata.cpp index 14c771b45c..92554c3bef 100644 --- a/ydb/core/tx/columnshard/engines/reader/read_metadata.cpp +++ b/ydb/core/tx/columnshard/engines/reader/read_metadata.cpp @@ -113,6 +113,13 @@ NIndexedReader::IOrderPolicy::TPtr TReadMetadata::BuildSortingPolicy() const { } ++idx; } + if (Program) { + for (ui32 i = 1; i < Program->Steps.size(); ++i) { + if (Program->Steps[i]->Filters.size()) { + return std::make_shared<NIndexedReader::TAnySorting>(this->shared_from_this()); + } + } + } return std::make_shared<NIndexedReader::TPKSortingWithLimit>(this->shared_from_this()); } else { |