Tikv lead function inconsistent behavior with tidb #51880
Labels
affects-8.1
may-affects-5.4
This bug maybe affects 5.4.x versions.
may-affects-6.1
may-affects-6.5
may-affects-7.1
may-affects-7.5
severity/major
sig/execution
SIG execution
type/bug
The issue is confirmed as a bug.
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
set tidb_opt_projection_push_down = 'on';
CREATE TABLE t (c1 VARCHAR(10),
j1 JSON,
i1 INT,
b1 BLOB,
d1 DOUBLE,
e1 DECIMAL(5,4),
e2 DECIMAL(5,2));
INSERT INTO t VALUES (null, '[6]', 6, '6', 6.0, 10.0/3, 20.0/3),
('7', null , 7, '7', 7.0, 10.0/3, 20.0/3),
('8', '[8]' , 7, '8', 8.0, 10.0/3, 20.0/3),
('9', '[9]' , null, '9', 9.0, 10.0/3, 20.0/3),
('0', '[0]' , 0, null, 0.0, 10.0/3, 20.0/3),
('1', '[1]' , 1, '1', null, 10.0/3, 20.0/3),
('2', '[2]' , 2, '2', 2.0, null, 20.0/3),
('3', '[3]' , 3, '3', 3.0, 10.0/3, null);
SELECT LEAD(i1, 100, e1) OVER () lie1, IFNULL(i1, e1) ifn_ie1 FROM t;
2. What did you expect to see? (Required)
lie1 ifn_ie1
3.3333 6.0000
3.3333 7.0000
3.3333 7.0000
3.3333 3.3333
3.3333 0.0000
3.3333 1.0000
NULL 2.0000
3.3333 3.0000
3. What did you see instead (Required)
3.3333 6
3.3333 7
3.3333 7
3.3333 3.3333
3.3333 0
3.3333 1
NULL 2
3.3333 3
4. What is your TiDB version? (Required)
| Release Version: v7.4.0-alpha-2012-gfe01d11df6-dirty
Edition: Community
Git Commit Hash: fe01d11
Git Branch: div_increase_prec
UTC Build Time: 2024-03-15 08:10:07
The text was updated successfully, but these errors were encountered: