Skip to content

Commit

Permalink
Fix test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
Dipesh Dhameliya committed Jul 9, 2024
1 parent e1a0ac2 commit 2c49d44
Show file tree
Hide file tree
Showing 2 changed files with 100 additions and 52 deletions.
80 changes: 52 additions & 28 deletions test/JDBC/expected/babel_numeric.out
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,12 @@ numeric
drop table t1;
go

select cast(1.23 as decimal(18,2))
union all
select cast(1.23 as decimal(7,2))
select * from
(
select cast(1.23 as decimal(18,2)) as col
union all
select cast(1.23 as decimal(7,2)) as col
) dummy order by col;
go
~~START~~
numeric
Expand All @@ -133,9 +136,12 @@ numeric
~~END~~


select cast(NULL as decimal(18,2))
union all
select cast(1.23 as decimal(7,2))
select * from
(
select cast(NULL as decimal(18,2)) as col
union all
select cast(1.23 as decimal(7,2)) as col
) dummy order by col;
go
~~START~~
numeric
Expand All @@ -144,14 +150,17 @@ numeric
~~END~~


select cast(9999999999999999.99 as decimal(18,2))
union all
select cast(99999.99 as decimal(7,2))
select * from
(
select cast(9999999999999999.99 as decimal(18,2)) as col
union all
select cast(99999.99 as decimal(7,2)) as col
) dummy order by col;
go
~~START~~
numeric
9999999999999999.99
99999.99
9999999999999999.99
~~END~~


Expand All @@ -161,9 +170,12 @@ go
create type decimal_7_2 from decimal(7,2);
go

select cast(1.23 as decimal_18_2)
union all
select cast(1.23 as decimal_7_2)
select * from
(
select cast(1.23 as decimal_18_2) as col
union all
select cast(1.23 as decimal_7_2) as col
) dummy order by col;
go
~~START~~
numeric
Expand All @@ -172,25 +184,31 @@ numeric
~~END~~


select cast(1.23 as decimal_18_2)
union all
select cast(NULL as decimal_7_2)
select * from
(
select cast(1.23 as decimal_18_2) as col
union all
select cast(NULL as decimal_7_2) as col
) dummy order by col;
go
~~START~~
numeric
1.23
<NULL>
1.23
~~END~~


select cast(9999999999999999.99 as decimal_18_2)
union all
select cast(99999.99 as decimal_7_2)
select * from
(
select cast(9999999999999999.99 as decimal_18_2) as col
union all
select cast(99999.99 as decimal_7_2) as col
) dummy order by col;
go
~~START~~
numeric
9999999999999999.99
99999.99
9999999999999999.99
~~END~~


Expand Down Expand Up @@ -314,9 +332,12 @@ go
create type numeric_7_2 from numeric(7,2);
go

select cast(1.23 as numeric_18_2)
union all
select cast(1.23 as numeric_7_2)
select * from
(
select cast(1.23 as numeric_18_2) as col
union all
select cast(1.23 as numeric_7_2) as col
) dummy order by col;
go
~~START~~
numeric
Expand All @@ -325,14 +346,17 @@ numeric
~~END~~


select cast(12344.234 as numeric_18_2)
union all
select cast(1.23 as numeric_7_2)
select * from
(
select cast(12344.234 as numeric_18_2) as col
union all
select cast(1.23 as numeric_7_2) as col
) dummy order by col;
go
~~START~~
numeric
12344.23
1.23
12344.23
~~END~~


Expand Down
72 changes: 48 additions & 24 deletions test/JDBC/input/babel_numeric.sql
Original file line number Diff line number Diff line change
Expand Up @@ -62,19 +62,28 @@ go
drop table t1;
go

select cast(1.23 as decimal(18,2))
union all
select cast(1.23 as decimal(7,2))
select * from
(
select cast(1.23 as decimal(18,2)) as col
union all
select cast(1.23 as decimal(7,2)) as col
) dummy order by col;
go

select cast(NULL as decimal(18,2))
union all
select cast(1.23 as decimal(7,2))
select * from
(
select cast(NULL as decimal(18,2)) as col
union all
select cast(1.23 as decimal(7,2)) as col
) dummy order by col;
go

select cast(9999999999999999.99 as decimal(18,2))
union all
select cast(99999.99 as decimal(7,2))
select * from
(
select cast(9999999999999999.99 as decimal(18,2)) as col
union all
select cast(99999.99 as decimal(7,2)) as col
) dummy order by col;
go

create type decimal_18_2 from decimal(18,2);
Expand All @@ -83,19 +92,28 @@ go
create type decimal_7_2 from decimal(7,2);
go

select cast(1.23 as decimal_18_2)
union all
select cast(1.23 as decimal_7_2)
select * from
(
select cast(1.23 as decimal_18_2) as col
union all
select cast(1.23 as decimal_7_2) as col
) dummy order by col;
go

select cast(1.23 as decimal_18_2)
union all
select cast(NULL as decimal_7_2)
select * from
(
select cast(1.23 as decimal_18_2) as col
union all
select cast(NULL as decimal_7_2) as col
) dummy order by col;
go

select cast(9999999999999999.99 as decimal_18_2)
union all
select cast(99999.99 as decimal_7_2)
select * from
(
select cast(9999999999999999.99 as decimal_18_2) as col
union all
select cast(99999.99 as decimal_7_2) as col
) dummy order by col;
go

create table babel_5086_t1 (a decimal(18,2), b decimal(7,2), c decimal_18_2, d decimal_7_2);
Expand Down Expand Up @@ -156,14 +174,20 @@ go
create type numeric_7_2 from numeric(7,2);
go

select cast(1.23 as numeric_18_2)
union all
select cast(1.23 as numeric_7_2)
select * from
(
select cast(1.23 as numeric_18_2) as col
union all
select cast(1.23 as numeric_7_2) as col
) dummy order by col;
go

select cast(12344.234 as numeric_18_2)
union all
select cast(1.23 as numeric_7_2)
select * from
(
select cast(12344.234 as numeric_18_2) as col
union all
select cast(1.23 as numeric_7_2) as col
) dummy order by col;
go

create table babel_5086_t2 (a numeric(18,2), b numeric(7,2), c numeric_18_2, d numeric_7_2);
Expand Down

0 comments on commit 2c49d44

Please sign in to comment.