Unexpected Results by CAST
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Bug Report
### 1. Minimal reproduce step (Required)
```sql
CREATE TABLE t0(c0 BLOB);
INSERT INTO t0 VALUES ('');
SELECT COUNT(t0.c0) FROM t0 WHERE CAST(- t0.c0 AS DATETIME) = - t0.c0; -- {1}
```
### 2. What did you expect to see? (Required)
The predicate `CAST(- t0.c0 AS DATETIME) = - t0.c0` is evaluated to `NULL`, so the result should be 0 instead of 1.
### 3. What did you see instead (Required)
### 4. What is your TiDB version? (Required)
```bash
+--------------------------------------------+
| version() |
+--------------------------------------------+
| 8.0.11-TiDB-v9.0.0-beta.1.pre-563-gea52376 |
+--------------------------------------------+
```
Contributor guide
Assessment
This issue has not been assessed yet.