diff --git a/test/JDBC/expected/babel_numeric.out b/test/JDBC/expected/babel_numeric.out index 369e6216955..8d3bb92a090 100644 --- a/test/JDBC/expected/babel_numeric.out +++ b/test/JDBC/expected/babel_numeric.out @@ -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 @@ -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 @@ -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~~ @@ -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 @@ -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 +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~~ @@ -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 @@ -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~~ diff --git a/test/JDBC/input/babel_numeric.sql b/test/JDBC/input/babel_numeric.sql index 4d297314dca..5717e3e540a 100644 --- a/test/JDBC/input/babel_numeric.sql +++ b/test/JDBC/input/babel_numeric.sql @@ -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); @@ -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); @@ -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);