mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 23:52:03 +00:00
Merge pull request #51499 from ClickHouse/qoega-patch-5
Fix segfault in MathUnary
This commit is contained in:
commit
fe43b4d62f
@ -154,6 +154,8 @@ private:
|
||||
using ColVecType = ColumnVectorOrDecimal<Type>;
|
||||
|
||||
const auto col_vec = checkAndGetColumn<ColVecType>(col.column.get());
|
||||
if (col_vec == nullptr)
|
||||
return false;
|
||||
return (res = execute<Type, ReturnType>(col_vec)) != nullptr;
|
||||
};
|
||||
|
||||
|
@ -0,0 +1,2 @@
|
||||
1
|
||||
1
|
6
tests/queries/0_stateless/02807_math_unary_crash.sql
Normal file
6
tests/queries/0_stateless/02807_math_unary_crash.sql
Normal file
@ -0,0 +1,6 @@
|
||||
DROP TABLE IF EXISTS t10;
|
||||
CREATE TABLE t10 (`c0` Int32) ENGINE = MergeTree ORDER BY tuple();
|
||||
INSERT INTO t10 (c0) FORMAT Values (-1);
|
||||
SELECT 1 FROM t10 GROUP BY erf(-sign(t10.c0));
|
||||
SELECT 1 FROM t10 GROUP BY -sign(t10.c0);
|
||||
DROP TABLE t10;
|
Loading…
Reference in New Issue
Block a user