Add tests

This commit is contained in:
Dmitry Novik 2024-09-02 17:07:59 +02:00
parent 769589dbc9
commit 5c39591ad1
2 changed files with 15 additions and 2 deletions

View File

@ -1,3 +1,8 @@
number UInt64
number UInt64
number UInt64
\'Biba\' String
CAST(dummy, \'Int\') Int32
CAST(dummy, \'String\') String
0
55

View File

@ -1,9 +1,17 @@
create view paramview as select * from system.numbers where number <= {top:UInt64};
describe paramview; -- { serverError UNSUPPORTED_METHOD }
describe paramview(top = 10);
describe paramview(top = 2 + 2);
create view p2 as select number, {name:String} from system.numbers where number <= {top:UInt64};
describe p2(top = 10); -- { serverError UNKNOWN_QUERY_PARAMETER }
describe p2(name = 'Biba', top = 2);
create view p3 as select CAST(dummy, {t:String});
describe p3(t = 'Int');
describe p3(t = 'String');
SELECT * FROM p3(t = 'String');
select arrayReduce('sum', (select groupArray(number) from paramview(top=10)));