ClickHouse/tests/queries/0_stateless/02495_concat_ws.sql

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

28 lines
1.4 KiB
MySQL
Raw Normal View History

2022-12-01 02:56:53 +00:00
select concatWs('|', 'a', 'b') == 'a|b';
select concatWs('|', 'a', materialize('b')) == 'a|b';
select concatWs('|', materialize('a'), 'b') == 'a|b';
select concatWs('|', materialize('a'), materialize('b')) == 'a|b';
select concatWs('|', 'a', toFixedString('b', 1)) == 'a|b';
select concatWs('|', 'a', materialize(toFixedString('b', 1))) == 'a|b';
select concatWs('|', materialize('a'), toFixedString('b', 1)) == 'a|b';
select concatWs('|', materialize('a'), materialize(toFixedString('b', 1))) == 'a|b';
select concatWs('|', toFixedString('a', 1), 'b') == 'a|b';
select concatWs('|', toFixedString('a', 1), materialize('b')) == 'a|b';
select concatWs('|', materialize(toFixedString('a', 1)), 'b') == 'a|b';
select concatWs('|', materialize(toFixedString('a', 1)), materialize('b')) == 'a|b';
select concatWs('|', toFixedString('a', 1), toFixedString('b', 1)) == 'a|b';
select concatWs('|', toFixedString('a', 1), materialize(toFixedString('b', 1))) == 'a|b';
select concatWs('|', materialize(toFixedString('a', 1)), toFixedString('b', 1)) == 'a|b';
select concatWs('|', materialize(toFixedString('a', 1)), materialize(toFixedString('b', 1))) == 'a|b';
select concatWs(null, 'a', 'b') == null;
select concatWs('1', null, 'b') == null;
select concatWs('1', 'a', null) == null;
select concatWs(materialize('|'), 'a', 'b'); -- { serverError 44 }
select concatWs(); -- { serverError 42 }
select concatWs('|', 'a', 100); -- { serverError 43 }