Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
yiguolei committed Nov 21, 2024
1 parent a65d446 commit 46d9ff5
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/function_bit_count.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ struct BitCountImpl {
std::is_same_v<T, Int32> || std::is_same_v<T, Int16> ||
std::is_same_v<T, Int8>) {
// ResultType already check the length
return cast_set<ResultType, false>(
return cast_set<ResultType, int, false>(
std::popcount(static_cast<std::make_unsigned_t<T>>(a)));
} else {
throw Exception(ErrorCode::INVALID_ARGUMENT,
Expand Down
4 changes: 2 additions & 2 deletions be/src/vec/functions/function_case.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ class FunctionCase : public IFunction {
Status execute_short_circuit(const DataTypePtr& data_type, Block& block, uint32_t result,
CaseWhenColumnHolder column_holder) const {
auto case_column_ptr = column_holder.when_ptrs[0].value_or(nullptr);
int rows_count = column_holder.rows_count;
size_t rows_count = column_holder.rows_count;

// `then` data index corresponding to each row of results, 0 represents `else`.
auto then_idx_uptr = std::unique_ptr<int[]>(new int[rows_count]);
Expand Down Expand Up @@ -204,7 +204,7 @@ class FunctionCase : public IFunction {
column_holder);
}

int rows_count = column_holder.rows_count;
size_t rows_count = column_holder.rows_count;

// `then` data index corresponding to each row of results, 0 represents `else`.
auto then_idx_uptr = std::unique_ptr<uint8_t[]>(new uint8_t[rows_count]);
Expand Down

0 comments on commit 46d9ff5

Please sign in to comment.