Fix ifnull/nvl expr result wrong precision

This commit is contained in:
hezuojiao
2023-04-27 02:14:22 +00:00
committed by ob-robot
parent f59bb29409
commit bc1c4b7599
6 changed files with 70 additions and 32 deletions

View File

@ -87,7 +87,7 @@ INSERT INTO t2 VALUES (0.0), (9.0);
SELECT IFNULL(t2.EMPNUM,t1.EMPNUM) AS CEMPNUM
FROM t1 LEFT JOIN t2 ON t1.EMPNUM=t2.EMPNUM;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def CEMPNUM 246 6 4 Y 32768 2 63
def CEMPNUM 246 15 4 Y 32768 2 63
CEMPNUM
0.00
2.00
@ -100,7 +100,7 @@ ifnull(0, 0.0)
insert into t3 values(0, 2.4, "123");
select ifnull(a, b), ifnull(a, c) from t3;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def ifnull(a, b) 246 11 1 Y 32768 0 63
def ifnull(a, b) 246 12 1 Y 32768 0 63
def ifnull(a, c) 253 44 1 Y 0 0 45
ifnull(a, b) ifnull(a, c)
0 0