mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 01:51:59 +00:00
Added test.
This commit is contained in:
parent
6bf9d670be
commit
840d5185b9
92
tests/queries/0_stateless/01353_nullable_tuple.reference
Normal file
92
tests/queries/0_stateless/01353_nullable_tuple.reference
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
single argument
|
||||||
|
1
|
||||||
|
0
|
||||||
|
1
|
||||||
|
0
|
||||||
|
1
|
||||||
|
0
|
||||||
|
- 1
|
||||||
|
1
|
||||||
|
1
|
||||||
|
1
|
||||||
|
0
|
||||||
|
0
|
||||||
|
0
|
||||||
|
0
|
||||||
|
0
|
||||||
|
0
|
||||||
|
1
|
||||||
|
1
|
||||||
|
1
|
||||||
|
- 2
|
||||||
|
1
|
||||||
|
1
|
||||||
|
1
|
||||||
|
0
|
||||||
|
0
|
||||||
|
0
|
||||||
|
0
|
||||||
|
0
|
||||||
|
1
|
||||||
|
1
|
||||||
|
1
|
||||||
|
1
|
||||||
|
- 3
|
||||||
|
1
|
||||||
|
1
|
||||||
|
1
|
||||||
|
1
|
||||||
|
1
|
||||||
|
1
|
||||||
|
- 4
|
||||||
|
\N
|
||||||
|
\N
|
||||||
|
\N
|
||||||
|
\N
|
||||||
|
\N
|
||||||
|
\N
|
||||||
|
two arguments
|
||||||
|
1
|
||||||
|
1
|
||||||
|
1
|
||||||
|
1
|
||||||
|
1
|
||||||
|
1
|
||||||
|
- 1
|
||||||
|
0
|
||||||
|
0
|
||||||
|
0
|
||||||
|
0
|
||||||
|
0
|
||||||
|
0
|
||||||
|
- 2
|
||||||
|
1
|
||||||
|
1
|
||||||
|
1
|
||||||
|
1
|
||||||
|
1
|
||||||
|
1
|
||||||
|
- 3
|
||||||
|
\N
|
||||||
|
\N
|
||||||
|
\N
|
||||||
|
\N
|
||||||
|
\N
|
||||||
|
1
|
||||||
|
\N
|
||||||
|
\N
|
||||||
|
0
|
||||||
|
many arguments
|
||||||
|
1
|
||||||
|
1
|
||||||
|
0
|
||||||
|
0
|
||||||
|
1
|
||||||
|
0
|
||||||
|
1
|
||||||
|
\N
|
||||||
|
\N
|
||||||
|
\N
|
||||||
|
\N
|
||||||
|
\N
|
||||||
|
\N
|
107
tests/queries/0_stateless/01353_nullable_tuple.sql
Normal file
107
tests/queries/0_stateless/01353_nullable_tuple.sql
Normal file
@ -0,0 +1,107 @@
|
|||||||
|
select 'single argument';
|
||||||
|
select tuple(number) = tuple(number) from numbers(1);
|
||||||
|
select tuple(number) = tuple(number + 1) from numbers(1);
|
||||||
|
select tuple(toNullable(number)) = tuple(number) from numbers(1);
|
||||||
|
select tuple(toNullable(number)) = tuple(number + 1) from numbers(1);
|
||||||
|
select tuple(toNullable(number)) = tuple(toNullable(number)) from numbers(1);
|
||||||
|
select tuple(toNullable(number)) = tuple(toNullable(number + 1)) from numbers(1);
|
||||||
|
select '- 1';
|
||||||
|
select tuple(toNullable(number)) < tuple(number + 1) from numbers(1);
|
||||||
|
select tuple(number) < tuple(toNullable(number + 1)) from numbers(1);
|
||||||
|
select tuple(toNullable(number)) < tuple(toNullable(number + 1)) from numbers(1);
|
||||||
|
|
||||||
|
select tuple(toNullable(number)) > tuple(number + 1) from numbers(1);
|
||||||
|
select tuple(number) > tuple(toNullable(number + 1)) from numbers(1);
|
||||||
|
select tuple(toNullable(number)) > tuple(toNullable(number + 1)) from numbers(1);
|
||||||
|
|
||||||
|
select tuple(toNullable(number + 1)) < tuple(number) from numbers(1);
|
||||||
|
select tuple(number + 1) < tuple(toNullable(number)) from numbers(1);
|
||||||
|
select tuple(toNullable(number + 1)) < tuple(toNullable(number + 1)) from numbers(1);
|
||||||
|
|
||||||
|
select tuple(toNullable(number + 1)) > tuple(number) from numbers(1);
|
||||||
|
select tuple(number + 1) > tuple(toNullable(number)) from numbers(1);
|
||||||
|
select tuple(toNullable(number + 1)) > tuple(toNullable(number)) from numbers(1);
|
||||||
|
|
||||||
|
select '- 2';
|
||||||
|
select tuple(toNullable(number)) <= tuple(number + 1) from numbers(1);
|
||||||
|
select tuple(number) <= tuple(toNullable(number + 1)) from numbers(1);
|
||||||
|
select tuple(toNullable(number)) <= tuple(toNullable(number + 1)) from numbers(1);
|
||||||
|
|
||||||
|
select tuple(toNullable(number)) >= tuple(number + 1) from numbers(1);
|
||||||
|
select tuple(number) > tuple(toNullable(number + 1)) from numbers(1);
|
||||||
|
select tuple(toNullable(number)) >= tuple(toNullable(number + 1)) from numbers(1);
|
||||||
|
|
||||||
|
select tuple(toNullable(number + 1)) <= tuple(number) from numbers(1);
|
||||||
|
select tuple(number + 1) <= tuple(toNullable(number)) from numbers(1);
|
||||||
|
select tuple(toNullable(number + 1)) <= tuple(toNullable(number + 1)) from numbers(1);
|
||||||
|
|
||||||
|
select tuple(toNullable(number + 1)) >= tuple(number) from numbers(1);
|
||||||
|
select tuple(number + 1) >= tuple(toNullable(number)) from numbers(1);
|
||||||
|
select tuple(toNullable(number + 1)) >= tuple(toNullable(number)) from numbers(1);
|
||||||
|
|
||||||
|
select '- 3';
|
||||||
|
select tuple(toNullable(number)) <= tuple(number) from numbers(1);
|
||||||
|
select tuple(number) <= tuple(toNullable(number)) from numbers(1);
|
||||||
|
select tuple(toNullable(number)) <= tuple(toNullable(number)) from numbers(1);
|
||||||
|
|
||||||
|
select tuple(toNullable(number)) >= tuple(number) from numbers(1);
|
||||||
|
select tuple(number) >= tuple(toNullable(number)) from numbers(1);
|
||||||
|
select tuple(toNullable(number)) >= tuple(toNullable(number)) from numbers(1);
|
||||||
|
|
||||||
|
select '- 4';
|
||||||
|
select tuple(number) = tuple(materialize(toUInt64OrNull(''))) from numbers(1);
|
||||||
|
select tuple(materialize(toUInt64OrNull(''))) = tuple(materialize(toUInt64OrNull(''))) from numbers(1);
|
||||||
|
select tuple(number) <= tuple(materialize(toUInt64OrNull(''))) from numbers(1);
|
||||||
|
select tuple(materialize(toUInt64OrNull(''))) <= tuple(materialize(toUInt64OrNull(''))) from numbers(1);
|
||||||
|
select tuple(number) >= tuple(materialize(toUInt64OrNull(''))) from numbers(1);
|
||||||
|
select tuple(materialize(toUInt64OrNull(''))) >= tuple(materialize(toUInt64OrNull(''))) from numbers(1);
|
||||||
|
|
||||||
|
select 'two arguments';
|
||||||
|
select tuple(toNullable(number), number) = tuple(number, number) from numbers(1);
|
||||||
|
select tuple(toNullable(number), toNullable(number)) = tuple(number, number) from numbers(1);
|
||||||
|
select tuple(toNullable(number), toNullable(number)) = tuple(toNullable(number), number) from numbers(1);
|
||||||
|
select tuple(toNullable(number), toNullable(number)) = tuple(toNullable(number), toNullable(number)) from numbers(1);
|
||||||
|
select tuple(number, toNullable(number)) = tuple(toNullable(number), toNullable(number)) from numbers(1);
|
||||||
|
select tuple(number, toNullable(number)) = tuple(toNullable(number), number) from numbers(1);
|
||||||
|
|
||||||
|
select '- 1';
|
||||||
|
select tuple(toNullable(number), number) < tuple(number, number) from numbers(1);
|
||||||
|
select tuple(toNullable(number), toNullable(number)) < tuple(number, number) from numbers(1);
|
||||||
|
select tuple(toNullable(number), toNullable(number)) < tuple(toNullable(number), number) from numbers(1);
|
||||||
|
select tuple(toNullable(number), toNullable(number)) < tuple(toNullable(number), toNullable(number)) from numbers(1);
|
||||||
|
select tuple(number, toNullable(number)) < tuple(toNullable(number), toNullable(number)) from numbers(1);
|
||||||
|
select tuple(number, toNullable(number)) < tuple(toNullable(number), number) from numbers(1);
|
||||||
|
|
||||||
|
select '- 2';
|
||||||
|
select tuple(toNullable(number), number) < tuple(number, number + 1) from numbers(1);
|
||||||
|
select tuple(toNullable(number), toNullable(number)) < tuple(number, number + 1) from numbers(1);
|
||||||
|
select tuple(toNullable(number), toNullable(number)) < tuple(toNullable(number + 1), number) from numbers(1);
|
||||||
|
select tuple(toNullable(number), toNullable(number)) < tuple(toNullable(number + 1), toNullable(number)) from numbers(1);
|
||||||
|
select tuple(number, toNullable(number)) < tuple(toNullable(number), toNullable(number + 1)) from numbers(1);
|
||||||
|
select tuple(number, toNullable(number)) < tuple(toNullable(number), number + 1) from numbers(1);
|
||||||
|
|
||||||
|
select '- 3';
|
||||||
|
select tuple(materialize(toUInt64OrNull('')), number) = tuple(number, number) from numbers(1);
|
||||||
|
select tuple(materialize(toUInt64OrNull('')), number) = tuple(number, toUInt64OrNull('')) from numbers(1);
|
||||||
|
select tuple(materialize(toUInt64OrNull('')), toUInt64OrNull('')) = tuple(toUInt64OrNull(''), toUInt64OrNull('')) from numbers(1);
|
||||||
|
select tuple(number, materialize(toUInt64OrNull(''))) < tuple(number, number) from numbers(1);
|
||||||
|
select tuple(number, materialize(toUInt64OrNull(''))) <= tuple(number, number) from numbers(1);
|
||||||
|
select tuple(number, materialize(toUInt64OrNull(''))) < tuple(number + 1, number) from numbers(1);
|
||||||
|
select tuple(number, materialize(toUInt64OrNull(''))) > tuple(number, number) from numbers(1);
|
||||||
|
select tuple(number, materialize(toUInt64OrNull(''))) >= tuple(number, number) from numbers(1);
|
||||||
|
select tuple(number, materialize(toUInt64OrNull(''))) > tuple(number + 1, number) from numbers(1);
|
||||||
|
|
||||||
|
select 'many arguments';
|
||||||
|
select tuple(toNullable(number), number, number) = tuple(number, number, number) from numbers(1);
|
||||||
|
select tuple(toNullable(number), materialize('a'), number) = tuple(number, materialize('a'), number) from numbers(1);
|
||||||
|
select tuple(toNullable(number), materialize('a'), number) = tuple(number, materialize('a'), number + 1) from numbers(1);
|
||||||
|
select tuple(toNullable(number), number, number) < tuple(number, number, number) from numbers(1);
|
||||||
|
select tuple(toNullable(number), number, number) <= tuple(number, number, number) from numbers(1);
|
||||||
|
select tuple(toNullable(number), materialize('a'), number) < tuple(number, materialize('a'), number) from numbers(1);
|
||||||
|
select tuple(toNullable(number), materialize('a'), number) < tuple(number, materialize('a'), number + 1) from numbers(1);
|
||||||
|
select tuple(toNullable(number), number, materialize(toUInt64OrNull(''))) = tuple(number, number, number) from numbers(1);
|
||||||
|
select tuple(toNullable(number), materialize('a'), materialize(toUInt64OrNull(''))) = tuple(number, materialize('a'), number) from numbers(1);
|
||||||
|
select tuple(toNullable(number), materialize('a'), materialize(toUInt64OrNull(''))) = tuple(number, materialize('a'), number + 1) from numbers(1);
|
||||||
|
select tuple(toNullable(number), number, materialize(toUInt64OrNull(''))) <= tuple(number, number, number) from numbers(1);
|
||||||
|
select tuple(toNullable(number), materialize('a'), materialize(toUInt64OrNull(''))) <= tuple(number, materialize('a'), number) from numbers(1);
|
||||||
|
select tuple(toNullable(number), materialize('a'), materialize(toUInt64OrNull(''))) <= tuple(number, materialize('a'), number + 1) from numbers(1);
|
Loading…
Reference in New Issue
Block a user