Commit b8d8d9b8 authored by Sergei Petrunia's avatar Sergei Petrunia

Add a testcase for non-integer range frame.

parent e859c2db
......@@ -949,3 +949,30 @@ pk a cnt
8 71 7
9 72 8
drop table t1;
# Try a RANGE frame over non-integer datatype:
create table t1 (
col1 int,
a decimal(5,3)
);
insert into t1 values (1, 0.45);
insert into t1 values (1, 0.5);
insert into t1 values (1, 0.55);
insert into t1 values (1, 1.21);
insert into t1 values (1, 1.22);
insert into t1 values (1, 3.33);
select
a,
count(col1) over (order by a
range between 0.1 preceding
and 0.1 following)
from t1;
a count(col1) over (order by a
range between 0.1 preceding
and 0.1 following)
0.450 3
0.500 3
0.550 3
1.210 2
1.220 2
3.330 1
drop table t1;
......@@ -570,3 +570,25 @@ from t1;
drop table t1;
--echo # Try a RANGE frame over non-integer datatype:
create table t1 (
col1 int,
a decimal(5,3)
);
insert into t1 values (1, 0.45);
insert into t1 values (1, 0.5);
insert into t1 values (1, 0.55);
insert into t1 values (1, 1.21);
insert into t1 values (1, 1.22);
insert into t1 values (1, 3.33);
select
a,
count(col1) over (order by a
range between 0.1 preceding
and 0.1 following)
from t1;
drop table t1;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment