aboutsummaryrefslogtreecommitdiffstats
path: root/yt
diff options
context:
space:
mode:
authoryuryalekseev <yuryalekseev@yandex-team.com>2024-07-19 17:30:08 +0300
committeryuryalekseev <yuryalekseev@yandex-team.com>2024-07-19 17:44:46 +0300
commitdb087f79670b18e688843ea625f031782644238d (patch)
tree0e136af335efc808e8efb07eb62d5b4d6001b27c /yt
parentb48cb40b16a2a26d360ddcb809dcbf48a3843513 (diff)
downloadydb-db087f79670b18e688843ea625f031782644238d.tar.gz
YT-20113: Fix TTableSchema::IsCGComparatorApplicable().
636571f1779643bc88d197b0d93ff23c456977aa
Diffstat (limited to 'yt')
-rw-r--r--yt/yt/client/table_client/schema.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/yt/yt/client/table_client/schema.cpp b/yt/yt/client/table_client/schema.cpp
index 747ce5feb1..bc4838f069 100644
--- a/yt/yt/client/table_client/schema.cpp
+++ b/yt/yt/client/table_client/schema.cpp
@@ -751,7 +751,14 @@ bool TTableSchema::IsEmpty() const
bool TTableSchema::IsCGComparatorApplicable() const
{
- return GetKeyColumnCount() <= MaxKeyColumnCountInDynamicTable;
+ if (GetKeyColumnCount() > MaxKeyColumnCountInDynamicTable) {
+ return false;
+ }
+
+ auto keyTypes = GetKeyColumnTypes();
+ return std::none_of(keyTypes.begin(), keyTypes.end(), [] (auto type) {
+ return type == EValueType::Any;
+ });
}
std::optional<int> TTableSchema::GetTtlColumnIndex() const