mirror of
https://github.com/zeek/zeek.git
synced 2025-10-07 17:18:20 +00:00
GH-973: Fix the return type of topk_get_top()
e.g. when using `string` elements it should return `vector of string`, not `vector of list of string` like it did before.
This commit is contained in:
parent
a431f6b45d
commit
49fc7924e0
3 changed files with 23 additions and 25 deletions
|
@ -191,9 +191,7 @@ IntrusivePtr<VectorVal> TopkVal::GetTopK(int k) const // returns vector
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
auto vector_index = make_intrusive<TypeList>(type);
|
||||
vector_index->Append(type);
|
||||
auto v = make_intrusive<VectorType>(std::move(vector_index));
|
||||
auto v = make_intrusive<VectorType>(type);
|
||||
auto t = make_intrusive<VectorVal>(std::move(v));
|
||||
|
||||
// this does no estimation if the results is correct!
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue