mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-06 09:08:43 +08:00
fix: correct loop logic for timestamptz scalar index output (#46100)
Related to #46098 Fix the ReverseDataFromIndex function where the assignment of raw_data to scalar_array and the break statement were incorrectly placed inside the for loop for TIMESTAMPTZ data type. This caused QueryNode to panic when outputting timestamptz fields from scalar index. Move the assignment and break statement outside the loop to match the pattern used by other data types like VARCHAR. Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
This commit is contained in:
parent
89b4c58266
commit
3bbc5d0825
@ -1003,10 +1003,10 @@ ReverseDataFromIndex(const index::IndexBase* index,
|
||||
valid_data[i] = true;
|
||||
}
|
||||
raw_data[i] = raw.value();
|
||||
auto obj = scalar_array->mutable_timestamptz_data();
|
||||
*(obj->mutable_data()) = {raw_data.begin(), raw_data.end()};
|
||||
break;
|
||||
}
|
||||
auto obj = scalar_array->mutable_timestamptz_data();
|
||||
*(obj->mutable_data()) = {raw_data.begin(), raw_data.end()};
|
||||
break;
|
||||
}
|
||||
case DataType::VARCHAR: {
|
||||
using IndexType = index::ScalarIndex<std::string>;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user