Added and updated tests

This commit is contained in:
Alexey Milovidov 2020-07-30 23:42:35 +03:00
parent e3946ef878
commit e63464facb
3 changed files with 61 additions and 6 deletions

View File

@ -23,13 +23,13 @@ String Array(UInt64)
a [0,1,3,6,9]
b [0,1,3,6,9,12,15,18,21,24]
k groupArrayMovingAvg(v)
String Array(UInt64)
a [0,0,0,1,2]
b [0,0,0,0,1,1,2,2,3,4]
String Array(Float64)
a [0,0.2,0.6,1.2,2]
b [0,0.1,0.3,0.6,1,1.5,2.1,2.8,3.6,4.5]
k groupArrayMovingAvg(3)(v)
String Array(UInt64)
a [0,0,1,2,3]
b [0,0,1,2,3,4,5,6,7,8]
String Array(Float64)
a [0,0.3333333333333333,1,2,3]
b [0,0.3333333333333333,1,2,3,4,5,6,7,8]
k groupArrayMovingSum(v)
String Array(UInt64)
a [0,1,3,6,10]

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,33 @@
SELECT groupArrayMovingSum(10)(1) FROM remote('127.0.0.{1,2}', numbers(100));
SELECT groupArrayMovingAvg(10)(1) FROM remote('127.0.0.{1,2}', numbers(100));
SELECT groupArrayMovingSum(256)(-1) FROM numbers(300);
SELECT groupArrayMovingSum(256)(-1) FROM remote('127.0.0.{1,2}', numbers(200));
SELECT groupArrayMovingAvg(256)(1) FROM numbers(300);
SELECT groupArrayMovingSum(256)(toDecimal32(100000000, 1)) FROM numbers(300);
SELECT groupArrayMovingSum(256)(toDecimal64(-1, 1)) FROM numbers(300);
SELECT groupArrayMovingAvg(256)(toDecimal128(-1, 1)) FROM numbers(300);
SELECT groupArrayMovingSum(10)(number) FROM numbers(100);
SELECT groupArrayMovingSum(10)(1) FROM numbers(100);
SELECT groupArrayMovingSum(0)(1) FROM numbers(100); -- { serverError 36 }
SELECT groupArrayMovingSum(0.)(1) FROM numbers(100); -- { serverError 36 }
SELECT groupArrayMovingSum(0.1)(1) FROM numbers(100); -- { serverError 36 }
SELECT groupArrayMovingSum(0.1)(1) FROM remote('127.0.0.{1,2}', numbers(100)); -- { serverError 36 }
SELECT groupArrayMovingSum(256)(1) FROM remote('127.0.0.{1,2}', numbers(100));
SELECT groupArrayMovingSum(256)(1) FROM remote('127.0.0.{1,2}', numbers(1000));
SELECT toTypeName(groupArrayMovingSum(256)(-1)) FROM remote('127.0.0.{1,2}', numbers(1000));
SELECT groupArrayMovingSum(256)(toDecimal32(1, 9)) FROM numbers(300);
SELECT groupArrayMovingSum(256)(toDecimal32(1000000000, 1)) FROM numbers(300); -- { serverError 407 }
SELECT groupArrayMovingSum(256)(toDecimal32(100000000, 1)) FROM numbers(300);
SELECT groupArrayMovingSum(256)(toDecimal32(1, 1)) FROM numbers(300);
SELECT groupArrayMovingAvg(256)(1) FROM remote('127.0.0.{1,2}', numbers(1000));
SELECT groupArrayMovingAvg(256)(-1) FROM numbers(300);
SELECT arrayMap(x -> round(x, 4), groupArrayMovingAvg(256)(1)) FROM numbers(300);
SELECT groupArrayMovingAvg(256)(toDecimal32(1, 9)) FROM numbers(300);
SELECT toTypeName(groupArrayMovingAvg(256)(toDecimal32(1, 9))) FROM numbers(300);
SELECT groupArrayMovingAvg(100)(toDecimal32(1, 9)) FROM numbers(300);