cast as binary does not behave correctly when data is NaN
Open
Nobody has claimed this yet.
affects-6.0
affects-6.1
component/compute
component/expression
severity/moderate
type/bug
- Dominant language
- C++
- Stars
- 1k
- Forks
- 423
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 24
Description
mysql> select /*+ READ_FROM_STORAGE(TIflash[t]) */ * from t where binary(c)='NaN';
+-------+
| c |
+-------+
| NaN |
+-------+
1 row in set (0.00 sec)
mysql> select /*+ READ_FROM_STORAGE(tikv[t]) */ * from t where binary(c)='NaN';
Empty set (0.01 sec)
v4.0.9
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the two queries from the issue on TiFlash and TiKV using the reported v4.0.9 behavior, focusing on the binary cast of NaN. Trace the relevant cast and comparison handling in the engine, then verify that both storage paths return consistent, correct results for the query.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100