Issue Details (XML | Word | Printable)

Key: CORE-6357
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Alexander Peshkov
Reporter: Pavel Zotov
Votes: 0
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
Firebird Core

LEAD() and LAG() do not allow to specify 3rd argument ("DEFAULT" value when pointer is out of scope) of INT128 datatype.

Created: 06/Jul/20 08:10 PM   Updated: 08/Jul/20 09:47 PM
Component/s: Engine
Affects Version/s: None
Fix Version/s: 4.0 RC 1

QA Status: Done successfully


 Description  « Hide

recreate table test1 (a smallint);
recreate table test2 (a bigint);
recreate table test3 (a int128);
recreate table test4 (a decfloat);
 
insert into test1 values (1);
insert into test1 values (2);
 
insert into test2 select * from test1;
insert into test3 select * from test1;
insert into test4 select * from test1;
 
set list on;
set sqlda_display on;
 
select a, lead(a, 1, 32767)over(order by a) lead_for_smallint from test1;
select a, lag(a, 1, -32768)over(order by a) lag_for_smallint from test1;
 
select a, lead(a, 1, 9223372036854775807)over(order by a) lead_for_bigint from test2;
select a, lag(a, 1, -9223372036854775808)over(order by a) lag_for_bigint from test2;
 
select a, lead(a, 1, 170141183460469231731687303715884105727)over(order by a) lead_for_int128 from test3;
select a, lag(a, 1, -170141183460469231731687303715884105728)over(order by a) lag_for_int128 from test3;
 
select a, lag(a, 1, -9.999999999999999999999999999999999e6144) over (order by a) lag_for_decfloat_1 from test4;
select a, lag(a, 1, -1.0e-6143)over(order by a) lag_for_decfloat_2 from test4;
select a, lag(a, 1, 1.0e-6143)over(order by a) lag_for_decfloat_3 from test4;
select a, lag(a, 1, 9.999999999999999999999999999999999e6144)over(order by a) lag_for_decfloat_4 from test4;
 

Result of LEAD() and LAG() for INT128 is:
=====
Statement failed, SQLSTATE = 22000
Decimal float invalid operation. An indeterminant error occurred during an operation.
=====

All other work OK.


 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.