mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
Merge pull request #62417 from Avogar/dot-product-overflow
Don't check overflow in arrayDotProduct in undefined sanitizer
This commit is contained in:
commit
49ba81a5f9
@ -66,13 +66,13 @@ struct DotProduct
|
||||
};
|
||||
|
||||
template <typename Type>
|
||||
static void accumulate(State<Type> & state, Type x, Type y)
|
||||
static NO_SANITIZE_UNDEFINED void accumulate(State<Type> & state, Type x, Type y)
|
||||
{
|
||||
state.sum += x * y;
|
||||
}
|
||||
|
||||
template <typename Type>
|
||||
static void combine(State<Type> & state, const State<Type> & other_state)
|
||||
static NO_SANITIZE_UNDEFINED void combine(State<Type> & state, const State<Type> & other_state)
|
||||
{
|
||||
state.sum += other_state.sum;
|
||||
}
|
||||
|
@ -0,0 +1 @@
|
||||
0
|
2
tests/queries/0_stateless/03037_dot_product_overflow.sql
Normal file
2
tests/queries/0_stateless/03037_dot_product_overflow.sql
Normal file
@ -0,0 +1,2 @@
|
||||
select ignore(dotProduct(materialize([9223372036854775807, 1]), materialize([-3, 1])));
|
||||
|
Loading…
Reference in New Issue
Block a user