fix: Remove cached null expr result (#42783)

pr: https://github.com/milvus-io/milvus/pull/42818
issue: #42698
cached result may be changed in caller so there is no need to cache it

Signed-off-by: sunby <sunbingyi1992@gmail.com>
This commit is contained in:
Bingyi Sun 2025-06-23 16:02:42 +08:00 committed by GitHub
parent f3e8f61f60
commit 1a1d46d695
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 7 deletions

View File

@ -118,10 +118,6 @@ PhyNullExpr::PreCheckNullable(OffsetVector* input) {
: batch_size_;
precheck_pos_ += batch_size;
}
if (cached_precheck_res_ != nullptr &&
cached_precheck_res_->size() == batch_size) {
return cached_precheck_res_;
}
auto res_vec = std::make_shared<ColumnVector>(TargetBitmap(batch_size),
TargetBitmap(batch_size));
@ -142,8 +138,7 @@ PhyNullExpr::PreCheckNullable(OffsetVector* input) {
"unsupported null expr type {}",
proto::plan::NullExpr_NullOp_Name(expr_->op_));
}
cached_precheck_res_ = res_vec;
return cached_precheck_res_;
return res_vec;
}
} //namespace exec

View File

@ -77,7 +77,6 @@ class PhyNullExpr : public SegmentExpr {
private:
std::shared_ptr<const milvus::expr::NullExpr> expr_;
ColumnVectorPtr cached_precheck_res_{nullptr};
int64_t precheck_pos_{0};
};
} //namespace exec