-
Notifications
You must be signed in to change notification settings - Fork 753
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
53 additions
and
18 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 4 additions & 5 deletions
9
tests/suites/0_stateless/02_0013_function_running_difference.result
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
1 0 1 0 1 0 0 | ||
3 2 3 2 3 2 0 | ||
5 2 5 2 5 2 0 | ||
10 5 10 5 10 5 0 | ||
ERROR 1105 (HY000) at line 7: Code: 7, displayText = Argument for function runningDifference must have numeric type. | ||
0 0 0 0 0 | ||
2 2 2 2 0 | ||
2 2 2 2 0 | ||
5 5 5 5 0 |
8 changes: 4 additions & 4 deletions
8
tests/suites/0_stateless/02_0013_function_running_difference.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
drop table if exists runing_difference_test; | ||
|
||
create table runing_difference_test (a Int8, b Int32, c Int64, d varchar) engine=Memory; | ||
insert into runing_difference_test values (1, 1, 1, 'a'),(3, 3, 3, 'b'),(5, 5, 5, 'c'),(10, 10, 10, 'd'); | ||
create table runing_difference_test (a Int8, b Int32, c Int64, d varchar, e Float32, f Float64) engine=Memory; | ||
insert into runing_difference_test values (1, 1, 1, 'a', 1, 1),(3, 3, 3, 'b', 3, 3),(5, 5, 5, 'c', 5, 5),(10, 10, 10, 'd', 10, 10); | ||
|
||
select a, runningDifference(a), b, runningDifference(b), c, runningDifference(c), runningDifference(10) from runing_difference_test; | ||
select d, runningDifference(d) from runing_difference_test; | ||
select runningDifference(a), runningDifference(b), runningDifference(c), runningDifference(e), runningDifference(10) from runing_difference_test; | ||
select d, runningDifference(d) from runing_difference_test; -- {ErrorCode 7} | ||
|
||
DROP TABLE IF EXISTS runing_difference_test; |