ClickHouse/dbms/tests/queries/0_stateless/01017_in_unconvertible_complex_type.sql
Alexander Kuzmenkov 160d8a6416 Ignore non-convertible values at any depth on the right side of IN
operator.

The values that are not convertible to the left argument type can't
match anyway, so it is safe to discard them.
2019-10-14 14:25:03 +03:00

14 lines
519 B
SQL

-- When left and right element types are compatible, but the particular value
-- on the right is not in the range of the left type, it should be ignored.
select (toUInt8(1)) in (-1);
select (toUInt8(0)) in (-1);
select (toUInt8(255)) in (-1);
select [toUInt8(1)] in [-1];
select [toUInt8(0)] in [-1];
select [toUInt8(255)] in [-1];
-- When left and right element types are not compatible, we should get an error.
select (toUInt8(1)) in ('a'); -- { serverError 53 }
select [toUInt8(1)] in ['a']; -- { serverError 53 }