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:
Jon Siwek 2020-06-02 19:42:12 -07:00
parent a431f6b45d
commit 49fc7924e0
3 changed files with 23 additions and 25 deletions

View file

@ -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!