From 5240dba89ddea5ec9bee53ea280340b9df3a6926 Mon Sep 17 00:00:00 2001 From: jacktengg Date: Fri, 8 Nov 2024 09:23:10 +0800 Subject: [PATCH] fix BE ut --- be/src/vec/functions/random.cpp | 2 +- be/test/vec/function/function_math_test.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/be/src/vec/functions/random.cpp b/be/src/vec/functions/random.cpp index 817fa5e94b8343f..fb6d9c60a53c4e7 100644 --- a/be/src/vec/functions/random.cpp +++ b/be/src/vec/functions/random.cpp @@ -72,7 +72,7 @@ class Random : public IFunction { if (!context->is_col_constant(0)) { return Status::InvalidArgument("The param of rand function must be literal"); } - int64_t seed = 0; + uint64_t seed = 0; if (!context->get_constant_col(0)->column_ptr->is_null_at(0)) { seed = (*context->get_constant_col(0)->column_ptr)[0].get(); } diff --git a/be/test/vec/function/function_math_test.cpp b/be/test/vec/function/function_math_test.cpp index bb24d141e4c3be5..d04b83433888a65 100644 --- a/be/test/vec/function/function_math_test.cpp +++ b/be/test/vec/function/function_math_test.cpp @@ -441,8 +441,8 @@ TEST(MathFunctionTest, random_test) { {{(int64_t)0}, 0.15979336337046085}, {{(int64_t)10}, 0.60128310734097479}, {{(int64_t)123}, 0.31320017867847078}, - {{(int64_t)std::numeric_limits::max()}, 0.20676730979843233}, - {{(int64_t)std::numeric_limits::min()}, 0.15979336337046085}}; + {{(int64_t)std::numeric_limits::max()}, 0.54774821662127238}, + {{(int64_t)std::numeric_limits::min()}, 0.75146173420574858}}; for (const auto& data : data_set) { DataSet data_line = {data};