-
Notifications
You must be signed in to change notification settings - Fork 411
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
expression: Fix the bug that castStringAsReal has different behaivor …
- Loading branch information
1 parent
3b3e86c
commit c1a9569
Showing
3 changed files
with
11 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,35 @@ | ||
mysql> drop table if exists test.t | ||
mysql> create table test.t(a char(30)) | ||
mysql> alter table test.t set tiflash replica 1 | ||
mysql> insert into test.t values ('1.23'),('123'),('-123.99'),('+123.123-'),(0),(0.0),(NULL),('1.11.00'),('11xx'),('11.xx'),('xx.11'),('1e649'),('-1e649'),('9.9999999999999999'),('9.999999999999999') | ||
mysql> insert into test.t values ('1.23'),('123'),('-123.99'),('+123.123-'),(0),(0.0),(NULL),('1.11.00'),('11xx'),('11.xx'),('xx.11'),('1e649'),('-1e649'),('9.9999999999999999'),('9.999999999999999'); | ||
mysql> insert into test.t values ('0x01'),('-0x01'),('1x01'),('-1x01.2'),('0x01.2'),('x1'); | ||
|
||
func> wait_table test t | ||
|
||
mysql> set tidb_allow_mpp=1; set tidb_isolation_read_engines='tiflash'; select a, b from (select a, cast(a as double) as b from test.t) t group by a, b order by a | ||
mysql> set tidb_enforce_mpp=1; set tidb_isolation_read_engines='tiflash'; select a, cast(a as double) b from test.t order by a; | ||
+--------------------+-------------------------+ | ||
| a | b | | ||
+--------------------+-------------------------+ | ||
| NULL | NULL | | ||
| +123.123- | 123.123 | | ||
| -0x01 | -0 | | ||
| -123.99 | -123.99 | | ||
| -1e649 | -1.7976931348623157e308 | | ||
| -1x01.2 | -1 | | ||
| 0 | 0 | | ||
| 0.0 | 0 | | ||
| 0x01 | 0 | | ||
| 0x01.2 | 0 | | ||
| 1.11.00 | 1.11 | | ||
| 1.23 | 1.23 | | ||
| 11.xx | 11 | | ||
| 11xx | 11 | | ||
| 123 | 123 | | ||
| 1e649 | 1.7976931348623157e308 | | ||
| 1x01 | 1 | | ||
| 9.999999999999999 | 9.999999999999998 | | ||
| 9.9999999999999999 | 10 | | ||
| x1 | 0 | | ||
| xx.11 | 0 | | ||
+--------------------+-------------------------+ | ||
|
||
mysql> drop table if exists test.t |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters