Merge pull request #51499 from ClickHouse/qoega-patch-5

Fix segfault in MathUnary
This commit is contained in:
Ilya Yatsishin 2023-06-29 18:23:33 +02:00 committed by GitHub
commit fe43b4d62f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 0 deletions

View File

@ -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;
};

View File

@ -0,0 +1,2 @@
1
1

View 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;