Fix reading quantized pool with const or missing features
@@ -161,7 +161,7 @@ TVector<ui32> GetIgnoredFlatIndices(const NCB::TQuantizedPool& pool) {
if (columnType == EColumn::Num) {
const auto it = pool.QuantizationSchema.GetFeatureIndexToSchema().find(featureIndex);
- if (it != pool.QuantizationSchema.GetFeatureIndexToSchema().end() &&
+ if (it == pool.QuantizationSchema.GetFeatureIndexToSchema().end() ||
it->second.GetBorders().empty()) {
indices.push_back(SafeIntegerCast<ui32>(featureIndex));
continue;
@@ -170,7 +170,7 @@ TVector<ui32> GetIgnoredFlatIndices(const NCB::TQuantizedPool& pool) {
CB_ENSURE(columnType == EColumn::Categ);
const auto it = pool.QuantizationSchema.GetCatFeatureIndexToSchema().find(featureIndex);
- if (it != pool.QuantizationSchema.GetCatFeatureIndexToSchema().end() &&
+ if (it == pool.QuantizationSchema.GetCatFeatureIndexToSchema().end() ||
it->second.GetPerfectHashes().empty()) {
indices.push_back(SafeIntegerCast<ui32>(featureIndex));
continue;
