Skip to content

Commit

Permalink
fix BE ut
Browse files Browse the repository at this point in the history
  • Loading branch information
jacktengg committed Nov 8, 2024
1 parent 404f2ff commit 5240dba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion be/src/vec/functions/random.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<int64_t>();
}
Expand Down
4 changes: 2 additions & 2 deletions be/test/vec/function/function_math_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<int64_t>::max()}, 0.20676730979843233},
{{(int64_t)std::numeric_limits<int64_t>::min()}, 0.15979336337046085}};
{{(int64_t)std::numeric_limits<int64_t>::max()}, 0.54774821662127238},
{{(int64_t)std::numeric_limits<int64_t>::min()}, 0.75146173420574858}};

for (const auto& data : data_set) {
DataSet data_line = {data};
Expand Down

0 comments on commit 5240dba

Please sign in to comment.