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-05-29 15:07:09 +08:00
2024-09-03 16:20:39 +08:00
2024-08-23 11:52:16 +08:00
2024-07-18 22:33:02 +08:00
2024-09-15 23:50:54 +08:00
2024-07-15 19:42:20 +08:00
2024-09-10 18:04:24 +08:00
2024-09-24 14:10:27 +08:00
2024-08-16 08:20:19 +08:00
2024-08-05 13:51:54 +08:00
2024-04-10 11:34:29 +08:00
2024-08-26 09:53:45 +08:00
2024-04-11 13:10:24 +08:00
2024-08-26 09:53:45 +08:00
2024-04-17 23:42:12 +08:00
2024-08-27 11:58:13 +08:00
2024-05-13 22:15:16 +08:00
2024-09-10 18:04:24 +08:00
2024-06-05 15:53:26 +08:00
2024-09-21 20:35:55 +08:00
2024-07-29 18:01:27 +08:00
2024-09-11 15:28:23 +08:00
2024-09-11 15:28:23 +08:00
2024-09-19 22:01:02 +08:00
2024-09-27 17:19:54 +08:00
2024-07-09 10:52:04 +08:00
2024-02-28 13:08:41 +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-06-25 13:35:01 +08:00
2024-07-26 14:50:06 +08:00
2024-01-19 15:48:56 +08:00
2024-07-31 22:46:37 +08:00
2024-09-15 21:38:43 +08:00
2024-10-10 17:55:40 +08:00
2024-09-24 09:58:50 +08:00
2024-09-29 09:19:17 +08:00
2024-04-30 07:26:23 +08:00
2024-07-17 13:48:21 +08:00
2024-07-14 18:38:52 +08:00
2024-08-22 00:42:12 +08:00
2024-03-09 19:45:46 +08:00
2024-07-18 08:07:16 +08:00
2024-09-12 14:03:43 +08:00
2024-09-24 16:04:30 +08:00
2024-10-10 22:27:04 +08:00
2024-03-21 14:07:24 +08:00
2024-01-16 18:31:27 +08:00
2024-10-09 14:03:02 +08:00
2024-08-26 17:48:52 +08:00
2024-09-02 14:50:48 +08:00
2024-09-29 09:19:17 +08:00
2024-09-01 00:41:10 +08:00
2024-09-13 20:47:57 +08:00
2024-07-08 19:04:51 +08:00
2024-08-02 19:10:00 +08:00
2024-10-11 09:32:00 +08:00
2024-09-24 09:46:07 +08:00
2024-09-20 18:17:44 +08:00
2024-01-16 18:37:06 +08:00
2024-10-09 12:19:28 +08:00
2024-09-10 11:51:41 +08:00
2024-08-15 14:16:57 +08:00
2024-08-09 04:01:20 +08:00
2024-08-09 04:06:47 +08:00
2024-08-28 10:15:52 +08:00
2024-05-24 16:25:00 +08:00
2024-05-24 16:25:00 +08:00
2024-09-20 17:35:27 +08:00
2024-07-31 10:24:10 +08:00
2024-09-12 22:42:20 +08:00
2024-09-26 22:50:34 +08:00
2024-10-09 23:03:01 +08:00
2024-05-24 16:25:00 +08:00
2024-10-10 14:02:23 +08:00
2024-05-24 16:25:00 +08:00
2024-08-21 09:26:53 +08:00
2024-05-28 17:54:13 +08:00
2024-05-24 16:25:00 +08:00
2024-06-06 19:55:24 +08:00
2024-09-30 09:53:18 +08:00
2024-09-11 15:35:20 +08:00
2024-07-14 18:38:52 +08:00
2024-05-31 10:53:12 +08:00
2024-01-08 10:46:27 +08:00
2024-04-19 23:41:46 +08:00
2024-09-23 12:32:29 +08:00
2024-08-27 14:58:28 +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-09-11 09:56:31 +08:00
2024-08-09 11:35:42 +08:00
2024-08-09 15:04:19 +08:00
2024-09-23 09:30:15 +08:00
2024-07-16 17:40:42 +08:00
2024-08-09 15:04:19 +08:00
2024-09-18 23:35:19 +08:00
2024-05-28 13:12:03 +08:00
2024-05-28 13:14:27 +08:00
2024-09-18 12:51:44 +08:00
2024-03-16 14:11:22 +08:00
2024-08-09 21:34:35 +08:00
2024-01-25 13:24:52 +08:00
2024-05-29 09:57:31 +08:00
2024-02-21 19:18:45 +08:00
2024-02-21 19:18:45 +08:00
2024-02-21 19:18:45 +08:00
2024-02-21 19:18:45 +08:00
2024-07-14 18:38:52 +08:00
2024-04-20 20:08:00 +08:00
2024-02-21 19:18:45 +08:00
2024-02-21 19:18:45 +08:00
2024-02-21 19:18:45 +08:00
2024-02-21 19:18:45 +08:00
2024-02-21 19:18:45 +08:00
2024-02-21 19:18:45 +08:00
2024-02-21 19:18:45 +08:00
2024-02-21 19:18:45 +08:00
2024-05-25 19:29:47 +08:00
2024-09-26 22:54:27 +08:00
2024-08-21 14:31:54 +08:00
2024-07-09 10:52:04 +08:00
2024-04-19 15:02:21 +08:00
2024-07-18 16:53:09 +08:00
2024-09-29 11:31:29 +08:00
2024-07-18 16:53:09 +08:00
2024-09-29 09:45:37 +08:00
2024-09-02 14:50:48 +08:00
2024-07-18 16:53:09 +08:00
2024-03-06 13:08:04 +08:00
2024-07-09 20:34:57 +08:00
2024-08-23 18:51:47 +08:00