-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Closed
Labels
challenge-programcomponent/expressioncomponent/jsonhelp wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.severity/majorsig/executionSIG executionSIG executiontype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.
Description
Description
Bug Report
create table tx2 (col json);
insert into tx2 values (json_array(3.0));
insert into tx2 values (json_array(3));
select col, count(1) from tx2 group by col;MySQL:
mysql> create table tx2 (col json);
Query OK, 0 rows affected (0.01 sec)
mysql> insert into tx2 values (json_array(3.0));
Query OK, 1 row affected (0.00 sec)
mysql> insert into tx2 values (json_array(3));
Query OK, 1 row affected (0.00 sec)
mysql> select col, count(1) from tx2 group by col;
+-------+----------+
| col | count(1) |
+-------+----------+
| [3.0] | 2 |
+-------+----------+
1 row in set (0.00 sec)
TiDB:
mysql> create table tx2 (col json);
Query OK, 0 rows affected (0.13 sec)
mysql> insert into tx2 values (json_array(3.0));
Query OK, 1 row affected (0.02 sec)
mysql> insert into tx2 values (json_array(3));
Query OK, 1 row affected (0.01 sec)
mysql> select col, count(1) from tx2 group by col;
+------+----------+
| col | count(1) |
+------+----------+
| [3] | 1 |
| [3] | 1 |
+------+----------+
2 rows in set (0.01 sec)
This simply indicates that generating the group key by using serialized value is incorrect. For JSON values, it is very clear that different memory / serialized values are treated as the same group.
SIG slack channel
Score
- 300
Mentor
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
challenge-programcomponent/expressioncomponent/jsonhelp wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.severity/majorsig/executionSIG executionSIG executiontype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.