diff --git a/regression-test/data/usercases/MHY/sql/q07.out b/regression-test/data/usercases/MHY/sql/q07.out index 58d7efabedbcd47..2ae4a1a24c16ed9 100644 --- a/regression-test/data/usercases/MHY/sql/q07.out +++ b/regression-test/data/usercases/MHY/sql/q07.out @@ -3,7 +3,7 @@ decimal-原始未截断 7.100000000 decimal-原始未截断 8.123456000 decimal-截断保留3位小数 7.100000000 -decimal-截断保留3位小数 8.122999999 +decimal-截断保留3位小数 8.123000000 decimal-截断保留5位小数 7.100000000 decimal-截断保留5位小数 8.123450000 decimal-截断保留7位小数 7.100000000 @@ -20,12 +20,12 @@ double-截断保留7位小数 7.1 double-截断保留7位小数 8.1234559 -- !q07_3 -- -原始数据-未做类型和精度转换 8.120000000 9.123456000 -原始数据-未做类型和精度转换 8.450000000 9.654321000 +decimal-round四舍五入保留两位小数 8.120000000 9.120000000 +decimal-round四舍五入保留两位小数 8.450000000 9.650000000 decimal-扩大类型 8.120000000 9.123456000 decimal-扩大类型 8.450000000 9.654321000 -decimal-round四舍五入保留两位小数 8.119999999 9.120000000 -decimal-round四舍五入保留两位小数 8.449999999 9.650000000 +原始数据-未做类型和精度转换 8.120000000 9.123456000 +原始数据-未做类型和精度转换 8.450000000 9.654321000 -- !q07_4 -- 56.325554000 diff --git a/regression-test/suites/usercases/MHY/sql/q07.sql b/regression-test/suites/usercases/MHY/sql/q07.sql index 4d72984763ce463..b7405f29efec2f0 100644 --- a/regression-test/suites/usercases/MHY/sql/q07.sql +++ b/regression-test/suites/usercases/MHY/sql/q07.sql @@ -1,8 +1,8 @@ with vb1 as( select '7.1' as col union all select '8.123456' as col ) -select 'decimal-原始未截断' as type, - cast(col as decimal(24,6)) col +select * from (select 'decimal-原始未截断' as type, + cast(col as decimal(25,6)) col from vb1 union all select 'decimal-截断保留3位小数' as type, @@ -14,13 +14,13 @@ select 'decimal-截断保留5位小数' as type, from vb1 union all select 'decimal-截断保留7位小数' as type, - truncate (cast(col as decimal(24,6)),7) col -from vb1; + truncate (cast(col as decimal(25,6)),7) col +from vb1) t order by type, col; with vb1 as( select '7.1' as col union all select '8.123456' as col ) -select 'double-原始未截断' as type, +select * from (select 'double-原始未截断' as type, cast(col as double) col from vb1 union all @@ -34,14 +34,14 @@ from vb1 union all -- ******结果不符合预期:8.1234559***** select 'double-截断保留7位小数' as type, truncate (cast(col as double),7) col -from vb1; +from vb1) as t order by type,col; with vb1 as( select cast('8.12' as decimal(20, 2)) as decimal_20_2, cast('9.123456' as decimal(20, 6)) as decimal_20_6 union all select cast('8.45' as decimal(20, 2)) as decimal_20_2, cast('9.654321' as decimal(20, 6)) as decimal_20_6 ) -select '原始数据-未做类型和精度转换' as type , +select * from (select '原始数据-未做类型和精度转换' as type , decimal_20_2 , decimal_20_6 from vb1 @@ -52,9 +52,9 @@ select 'decimal-扩大类型' as type , from vb1 union all select 'decimal-round四舍五入保留两位小数' as type, -- *** 扩大精度后四舍五入结果错误8.12结果为8.119999999 - round(cast(decimal_20_2 as decimal(24,6)),2) decimal_20_2 , - round(cast(decimal_20_6 as decimal(24,6)),2) decimal_20_6 -from vb1; + round(cast(decimal_20_2 as decimal(25,6)),2) decimal_20_2 , + round(cast(decimal_20_6 as decimal(25,6)),2) decimal_20_6 +from vb1) as t order by type,decimal_20_2, decimal_20_6; with vb1 as( select cast('8.12' as decimal(20, 2)) as decimal_20_2,cast('9.123456' as decimal(20, 6)) as decimal_20_6 diff --git a/regression-test/suites/usercases/WanKa/ddl/tb_td_vivo_idea_daily_report.sql b/regression-test/suites/usercases/WanKa/ddl/tb_td_vivo_idea_daily_report.sql index 2a0be57636d1db1..1e28cf29e4c7dba 100644 --- a/regression-test/suites/usercases/WanKa/ddl/tb_td_vivo_idea_daily_report.sql +++ b/regression-test/suites/usercases/WanKa/ddl/tb_td_vivo_idea_daily_report.sql @@ -64,7 +64,7 @@ PARTITION p202311 VALUES [('2023-11-01'), ('2023-12-01')), PARTITION p202312 VALUES [('2023-12-01'), ('2024-01-01'))) DISTRIBUTED BY HASH(`date`, `idea_id`, `place_type`) BUCKETS 4 PROPERTIES ( -"replication_allocation" = "tag.location.default: 2", +"replication_allocation" = "tag.location.default: 1", "bloom_filter_columns" = "date, place_type, idea_id", "in_memory" = "false", "storage_format" = "V2",