starrocks icon indicating copy to clipboard operation
starrocks copied to clipboard

[function]The result of mod(char)/mod(varchar) is wrong

Open lvchenyang-maker opened this issue 3 years ago • 0 comments

Steps to reproduce the behavior (Required)

 CREATE TABLE `duplicate_table_with_null` ( `k1`  date, `k2`  datetime, `k3`  char(20), `k4`  varchar(20), `k5`  boolean, `k6`  tinyint, `k7`  smallint, `k8`  int, `k9`  bigint, `k10` largeint, `k11` float, `k12` double, `k13` decimal(27,9) ) ENGINE=OLAP DUPLICATE KEY(`k1`, `k2`, `k3`, `k4`, `k5`) COMMENT "OLAP" DISTRIBUTED BY HASH(`k1`, `k2`, `k3`) BUCKETS 3 PROPERTIES ( "replication_num" = "3", "storage_format" = "v2" );
insert into test_math_7e51f0f0_3a7a_11ed_8661_00163e0e550b.duplicate_table_with_null (k1, k2, k3, k4, k5, k6, k7, k8, k9, k10, k11, k12, k13)values ('2020-07-25', '2020-07-25 09:06:09', 'shenzhen', 'futian', 0, -127, 1, -2147450879, -9223372036854743039, -18446744073709518847, 3273.8, 324.55, 29.628);
select mod(k3, 1),mod(k4, 1) from duplicate_table_with_null;

Other functions have the same problem e.g. abs/sin/cos/acos/tan/atan/cot/ceil/floor/round/ln/log/log2/log10/exp/radians/sqrt/pow

Expected behavior (Required)

mysql 5.7 0

Real behavior (Required)

null

StarRocks version (Required)

  • You can get the StarRocks version by executing SQL select current_version()
+----------------------+
| current_version()    |
+----------------------+
| MAIN-RELEASE 9cada5e |
+----------------------+

lvchenyang-maker avatar Sep 22 '22 13:09 lvchenyang-maker