You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
createtablet(a varchar(10));
explain select*from t where cast(a as float) and cast(a aschar);
explain select*from t where a = 0xe59388e59388e59388 and a = 0xe598bfe598bfe598bf;
UPDATE: the second SQL can't trigger the bug anymore. Please switch to use the following SQL:
explain select*from t30094 t1 where concat(t1.a,'1') = _binary 0xe59388e59388e59388 collate binary and concat(t1.a,'1') = _binary 0xe598bfe598bfe598bf collate binary;
2. What did you expect to see? (Required)
The selection operator has two conditions.
3. What did you see instead (Required)
> explain select*from t where cast(a as float) and cast(a aschar);
+-------------------------+----------+-----------+---------------+--------------------------------+
| id | estRows | task | access object | operator info |
+-------------------------+----------+-----------+---------------+--------------------------------+
| TableReader_7 | 8000.00 | root | | data:Selection_6 |
| └─Selection_6 | 8000.00 | cop[tikv] | | cast(test2.t.a, float BINARY) |
| └─TableFullScan_5 | 10000.00 | cop[tikv] | table:t | keep order:false, stats:pseudo |
+-------------------------+----------+-----------+---------------+--------------------------------+> explain select*from t where a = 0xe59388e59388e59388 and a = 0xe598bfe598bfe598bf;
+-------------------------+----------+-----------+---------------+---------------------------------------+
| id | estRows | task | access object | operator info |
+-------------------------+----------+-----------+---------------+---------------------------------------+
| TableReader_7 | 10.00 | root | | data:Selection_6 |
| └─Selection_6 | 10.00 | cop[tikv] | | eq(test2.t.a, "0xe59388e59388e59388") |
| └─TableFullScan_5 | 10000.00 | cop[tikv] | table:t | keep order:false, stats:pseudo |
+-------------------------+----------+-----------+---------------+---------------------------------------+
4. What is your TiDB version? (Required)
master
The text was updated successfully, but these errors were encountered:
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
UPDATE: the second SQL can't trigger the bug anymore. Please switch to use the following SQL:
2. What did you expect to see? (Required)
The selection operator has two conditions.
3. What did you see instead (Required)
4. What is your TiDB version? (Required)
master
The text was updated successfully, but these errors were encountered: