mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Fix UBSan report in arraySum
This commit is contained in:
parent
110089086b
commit
2cd04e8923
@ -5,6 +5,7 @@
|
||||
#include <Columns/ColumnDecimal.h>
|
||||
#include "FunctionArrayMapped.h"
|
||||
#include <Functions/FunctionFactory.h>
|
||||
#include <common/defines.h>
|
||||
|
||||
|
||||
namespace DB
|
||||
@ -121,7 +122,7 @@ struct ArrayAggregateImpl
|
||||
}
|
||||
|
||||
template <typename Element>
|
||||
static bool executeType(const ColumnPtr & mapped, const ColumnArray::Offsets & offsets, ColumnPtr & res_ptr)
|
||||
static NO_SANITIZE_UNDEFINED bool executeType(const ColumnPtr & mapped, const ColumnArray::Offsets & offsets, ColumnPtr & res_ptr)
|
||||
{
|
||||
using Result = ArrayAggregateResult<Element, aggregate_operation>;
|
||||
using ColVecType = std::conditional_t<IsDecimalNumber<Element>, ColumnDecimal<Element>, ColumnVector<Element>>;
|
||||
|
@ -0,0 +1 @@
|
||||
446744073709551616
|
@ -0,0 +1 @@
|
||||
SELECT arraySum([-9000000000000000000, -9000000000000000000]);
|
Loading…
Reference in New Issue
Block a user