diff --git a/be/src/vec/functions/function_bit_count.cpp b/be/src/vec/functions/function_bit_count.cpp index 14ea83f2c32fdab..d4d9306a7c58bba 100644 --- a/be/src/vec/functions/function_bit_count.cpp +++ b/be/src/vec/functions/function_bit_count.cpp @@ -44,7 +44,7 @@ struct BitCountImpl { std::is_same_v || std::is_same_v || std::is_same_v) { // ResultType already check the length - return cast_set( + return cast_set( std::popcount(static_cast>(a))); } else { throw Exception(ErrorCode::INVALID_ARGUMENT, diff --git a/be/src/vec/functions/function_case.h b/be/src/vec/functions/function_case.h index a579f6596a845a0..97de565b90ca56b 100644 --- a/be/src/vec/functions/function_case.h +++ b/be/src/vec/functions/function_case.h @@ -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(new int[rows_count]); @@ -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(new uint8_t[rows_count]);