Mryange
6dddd4c499
[function](cast)Make string casting to integers more like MySQL's beh… ( #41541 )
...
…avior (#38847 )
https://github.com/apache/doris/pull/38847
## Proposed changes
There are two issues here. First, the results of casting are
inconsistent between FE and BE .
```
FE
mysql [(none)]>select cast('3.000' as int);
+----------------------+
| cast('3.000' as INT) |
+----------------------+
| 3 |
+----------------------+
mysql [(none)]>set debug_skip_fold_constant = true;
BE
mysql [(none)]>select cast('3.000' as int);
+----------------------+
| cast('3.000' as INT) |
+----------------------+
| NULL |
+----------------------+
```
The second issue is that casting on BE converts '3.0' to null. Here, the
casting logic for FE and BE has been unified
<!--Describe your changes.-->
## Proposed changes
Issue Number: close #xxx
<!--Describe your changes.-->
---------
Co-authored-by: Xinyi Zou <zouxinyi02@gmail.com >
2024-10-11 09:32:00 +08:00
..
2024-08-23 11:52:16 +08:00
2024-04-22 13:52:36 +08:00
2024-09-24 09:41:41 +08:00
2024-08-16 08:20:19 +08:00
2024-02-21 13:53:18 +08:00
2024-04-25 12:01:44 +08:00
2024-08-21 14:31:54 +08:00
2024-07-04 13:56:05 +08:00
2024-09-27 19:13:54 +08:00
2024-09-27 17:19:54 +08:00
2024-08-09 11:35:42 +08:00
2024-10-11 09:32:00 +08:00
2024-09-27 19:13:54 +08:00
2024-08-23 17:17:05 +08:00
2024-07-26 14:50:06 +08:00
2024-07-04 13:56:05 +08:00
2024-10-09 23:03:01 +08:00
2024-09-15 21:38:43 +08:00
2024-10-10 17:55:40 +08:00
2024-08-01 11:37:57 +08:00
2024-09-23 09:30:15 +08:00
2023-12-14 17:06:17 +08:00
2024-07-17 13:48:21 +08:00
2024-08-09 11:35:42 +08:00
2024-04-11 17:12:17 +08:00
2024-04-11 17:12:17 +08:00
2024-08-30 10:01:10 +08:00
2024-03-21 14:07:24 +08:00
2024-10-08 22:12:10 +08:00
2024-08-21 09:01:12 +08:00
2024-09-02 14:50:48 +08:00
2024-09-01 00:41:10 +08:00
2024-09-13 20:47:57 +08:00
2024-08-07 22:05:43 +08:00
2024-08-07 22:05:43 +08:00
2024-10-11 09:32:00 +08:00
2024-07-11 17:52:21 +08:00
2024-09-20 18:17:44 +08:00
2024-01-16 18:37:06 +08:00
2024-09-10 11:51:41 +08:00
2024-09-10 11:51:41 +08:00
2024-08-15 14:16:57 +08:00
2024-08-09 04:06:47 +08:00
2024-08-22 00:24:57 +08:00
2024-04-10 16:22:39 +08:00
2024-03-22 16:35:47 +08:00
2024-09-20 17:35:27 +08:00
2024-10-09 23:02:06 +08:00
2024-06-19 14:47:55 +08:00
2024-10-11 09:32:00 +08:00
2024-09-23 22:34:03 +08:00
2024-05-31 10:53:12 +08:00
2024-09-26 09:55:33 +08:00
2024-10-09 23:02:06 +08:00
2024-10-09 23:02:06 +08:00
2024-05-28 17:54:13 +08:00
2024-10-10 14:02:23 +08:00
2024-09-11 15:35:20 +08:00
2024-06-20 17:51:18 +08:00
2024-05-24 16:25:00 +08:00
2024-01-08 10:46:27 +08:00
2024-04-19 23:41:46 +08:00
2024-09-21 20:34:05 +08:00
2024-07-01 23:11:13 +08:00
2024-10-10 17:54:54 +08:00
2024-05-21 12:54:25 +08:00
2024-07-15 18:47:36 +08:00
2024-08-09 11:35:42 +08:00
2024-08-09 11:35:42 +08:00
2024-07-03 22:42:51 +08:00
2024-08-09 11:35:42 +08:00
2024-02-23 23:10:36 +08:00
2024-08-09 11:35:42 +08:00
2024-05-28 13:12:03 +08:00
2024-02-16 10:12:23 +08:00
2023-12-21 18:08:23 +08:00
2024-05-29 09:57:31 +08:00
2023-12-22 14:50:11 +08:00
2023-12-05 12:54:40 +08:00
2023-12-05 12:54:40 +08:00
2024-04-12 15:09:25 +08:00
2023-12-05 12:54:40 +08:00
2023-12-05 12:54:40 +08:00
2023-12-05 12:54:40 +08:00
2023-12-28 14:54:09 +08:00
2023-12-05 12:54:40 +08:00
2024-08-09 11:35:42 +08:00
2024-09-26 22:54:27 +08:00
2024-08-21 14:31:54 +08:00
2024-08-09 11:35:42 +08:00
2024-04-19 15:02:21 +08:00
2024-07-18 16:53:09 +08:00
2024-08-29 00:30:37 +08:00
2024-07-18 16:53:09 +08:00
2024-10-11 09:32:00 +08:00
2024-09-02 14:50:48 +08:00
2023-12-15 10:52:50 +08:00
2024-08-09 11:35:42 +08:00
2024-08-23 18:51:47 +08:00