Inconsistent Result/Error from Tiflash
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Bug Report
Please answer these questions before submitting your issue. Thanks!
### 1. Minimal reproduce step (Required)
```sql
CREATE TABLE `t1` (
`col1` varchar(255) NOT NULL,
`col2` timestamp NOT NULL DEFAULT '2024-11-17 00:00:00',
PRIMARY KEY (`col1`,`col2`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
INSERT INTO `t1` VALUES
('qweasd','2001-01-09 00:00:00'),
('qwasdxzr','1949-03-02 00:00:00');
ALTER TABLE t1 SET TIFLASH REPLICA 1;
SELECT /*+ READ_FROM_STORAGE(TIKV[`t1`])*/ MAX(`col1`) AS `r2`
FROM `t1` WHERE `col2` IN ('1888-08-15', '1888-05-14') GROUP BY `col2`
HAVING `col2` <= '2022-03-22';
SELECT /*+ READ_FROM_STORAGE(TIFLASH[`t1`])*/ MAX(`col1`) AS `r2` FROM `t1`
WHERE `col2` IN ('1888-08-15', '1888-05-14')
GROUP BY `col2`
HAVING `col2` <= '2022-03-22';
```
### 2. What did you expect to see? (Required)
The both return the same value/ result
### 3. What did you see instead (Required)
```sql
mysql> SELECT /*+ READ_FROM_STORAGE(TIKV[`t1`])*/
-> MAX(`col1`) AS `r2`
-> FROM `t1`
-> WHERE `col2` IN ('1888-08-15', '1888-05-14')
-> GROUP BY `col2`
-> HAVING `col2` <= '2022-03-22';
ERROR 1105 (HY000): other error: [components/tidb_query_expr/src/types/expr_builder.rs:460]: Unable to decode date time from the request
mysql>
mysql> SELECT /*+ READ_FROM_STORAGE(TIFLASH[`t1`])*/
-> MAX(`col1`) AS `r2`
-> FROM `t1`
-> WHERE `col2` IN ('1888-08-15', '1888-05-14')
-> GROUP BY `col2`
-> HAVING `col2` <= '2022-03-22';
Empty set (0.02 sec)
```
### 4. What is your TiDB version? (Required)
TiDB v8.4.0
Contributor guide
Assessment
This issue has not been assessed yet.