Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
b8d8d9b8
Commit
b8d8d9b8
authored
Mar 13, 2016
by
Sergei Petrunia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a testcase for non-integer range frame.
parent
e859c2db
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
0 deletions
+49
-0
mysql-test/r/win.result
mysql-test/r/win.result
+27
-0
mysql-test/t/win.test
mysql-test/t/win.test
+22
-0
No files found.
mysql-test/r/win.result
View file @
b8d8d9b8
...
...
@@ -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;
mysql-test/t/win.test
View file @
b8d8d9b8
...
...
@@ -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
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment