Open apollodafoni opened 2 weeks ago
/severity minor
isnull
returns true because the selection
is pushed down to tikv, and tikv return null
, but TiDB does not return null for adddate(col1, interval 10 hour_minute)
I think this is because in TiDB, it does not check if the duration is overflow during the execution.
For example:
https://github.com/pingcap/tidb/blob/390de884f4e3088a0bf828fe883627c5436542be/pkg/types/time.go#L1321-L1333
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
Mysql: +-----------+----------------------------------------+ | col1 | adddate(col1, interval 10 hour_minute) | +-----------+----------------------------------------+ | 838:59:59 | NULL | +-----------+----------------------------------------+
3. What did you see instead (Required)
Since adddate(col1, interval 10 hour_minute) returns
839:09:59
, why can it be returned in theisnull
judgment?4. What is your TiDB version? (Required)
Release Version: v8.4.0 Edition: Community Git Commit Hash: 2511e928966110964414e6bbb630a565a9870a52 Git Branch: HEAD UTC Build Time: 2024-10-27 16:16:04 GoVersion: go1.23.2 Race Enabled: false Check Table Before Drop: false Store: tikv