enhance: Improve error message when query vector and dim mismatch (#43835)

/kind improvement

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
This commit is contained in:
yihao.dai 2025-08-18 01:07:44 +08:00 committed by GitHub
parent 03295bb351
commit 64ab3d2681
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -70,7 +70,11 @@ ParsePlaceholderGroup(const Plan* plan,
auto& target = element.blob_; auto& target = element.blob_;
target.reserve(line_size * element.num_of_queries_); target.reserve(line_size * element.num_of_queries_);
for (auto& line : info.values()) { for (auto& line : info.values()) {
Assert(line_size == line.size()); AssertInfo(line_size == line.size(),
"vector dimension mismatch, expected vector "
"size(byte) {}, actual {}.",
line_size,
line.size());
target.insert(target.end(), line.begin(), line.end()); target.insert(target.end(), line.begin(), line.end());
} }
} }