mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 10:02:01 +00:00
fixed suggestions
This commit is contained in:
parent
22052381d9
commit
1c400432d9
@ -1408,9 +1408,9 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (isArray(arguments[0]) && isArray(arguments[1]))
|
if constexpr (is_plus || is_minus)
|
||||||
{
|
{
|
||||||
if constexpr (is_plus || is_minus)
|
if (isArray(arguments[0]) && isArray(arguments[1]))
|
||||||
{
|
{
|
||||||
DataTypes new_arguments {
|
DataTypes new_arguments {
|
||||||
static_cast<const DataTypeArray &>(*arguments[0]).getNestedType(),
|
static_cast<const DataTypeArray &>(*arguments[0]).getNestedType(),
|
||||||
@ -1418,8 +1418,6 @@ public:
|
|||||||
};
|
};
|
||||||
return std::make_shared<DataTypeArray>(getReturnTypeImplStatic(new_arguments, context));
|
return std::make_shared<DataTypeArray>(getReturnTypeImplStatic(new_arguments, context));
|
||||||
}
|
}
|
||||||
else
|
|
||||||
throw Exception(ErrorCodes::UNSUPPORTED_METHOD, "Cannot use this operation on arrays");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ SELECT ([1,2::UInt64]+[1,number]) from numbers(5);
|
|||||||
CREATE TABLE my_table (values Array(Int32)) ENGINE = MergeTree() ORDER BY values;
|
CREATE TABLE my_table (values Array(Int32)) ENGINE = MergeTree() ORDER BY values;
|
||||||
INSERT INTO my_table (values) VALUES ([12, 3, 1]);
|
INSERT INTO my_table (values) VALUES ([12, 3, 1]);
|
||||||
SELECT values - [1,2,3] FROM my_table WHERE arrayExists(x -> x > 5, values);
|
SELECT values - [1,2,3] FROM my_table WHERE arrayExists(x -> x > 5, values);
|
||||||
SELECT ([12,13] % [5,6]); -- { serverError 1 }
|
SELECT ([12,13] % [5,6]); -- { serverError 43 }
|
||||||
SELECT ([2,3,4]-[1,-2,10,29]); -- { serverError 190 }
|
SELECT ([2,3,4]-[1,-2,10,29]); -- { serverError 190 }
|
||||||
CREATE TABLE a ( x Array(UInt64), y Array(UInt64)) ENGINE = Memory;
|
CREATE TABLE a ( x Array(UInt64), y Array(UInt64)) ENGINE = Memory;
|
||||||
INSERT INTO a VALUES ([2,3],[4,5]),([1,2,3], [4,5]),([6,7],[8,9,10]);
|
INSERT INTO a VALUES ([2,3],[4,5]),([1,2,3], [4,5]),([6,7],[8,9,10]);
|
||||||
|
Loading…
Reference in New Issue
Block a user