This is an automated email from the ASF dual-hosted git repository. caiconghui pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-doris.git
The following commit(s) were added to refs/heads/master by this push: new 47d6b1f Fix ut failed for topn_function_test (#5449) 47d6b1f is described below commit 47d6b1ff0b9288fc7315a7077cf43c4060378b1d Author: caiconghui <55968745+caicong...@users.noreply.github.com> AuthorDate: Thu Mar 4 21:53:52 2021 +0800 Fix ut failed for topn_function_test (#5449) Co-authored-by: caiconghui [蔡聪辉] <caicong...@xiaomi.com> --- be/test/exprs/topn_function_test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/be/test/exprs/topn_function_test.cpp b/be/test/exprs/topn_function_test.cpp index 1b02f1f..7648a25 100644 --- a/be/test/exprs/topn_function_test.cpp +++ b/be/test/exprs/topn_function_test.cpp @@ -113,7 +113,7 @@ void test_topn_accuracy(FunctionContext* ctx, int key_space, int space_expand_ra std::uniform_int_distribution<> dist(0, PARALLEL-1); for (uint32_t i = 0; i < TOTAL_RECORDS; ++i) { // generate zipf_distribution - uint32_t index = zf(gen); + uint32_t index = zf(gen) - 1; // choose one single topn to update topn_single(ctx, random_strs[index], single_dst_str[dist(random_gen)], accuracy_map); } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org