Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Projection push down to tikv leads to incorrect result when subquery and agg #51874

Closed
Tracked by #51876
yibin87 opened this issue Mar 19, 2024 · 15 comments · Fixed by #51918
Closed
Tracked by #51876

Projection push down to tikv leads to incorrect result when subquery and agg #51874

yibin87 opened this issue Mar 19, 2024 · 15 comments · Fixed by #51918

Comments

@yibin87
Copy link
Contributor

yibin87 commented Mar 19, 2024

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(a INT, b INT);
INSERT INTO t VALUES (5,6), (1,7);
CREATE TABLE t2(i INT);
INSERT INTO t2 VALUES (10),(100);
SELECT (SELECT SUM(a) OVER () FROM t2 LIMIT 1) FROM t;

2. What did you expect to see? (Required)

10
2

3. What did you see instead (Required)

NULL
NULL

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

@yibin87 yibin87 added the type/bug The issue is confirmed as a bug. label Mar 19, 2024
@yibin87
Copy link
Contributor Author

yibin87 commented Mar 19, 2024

tidb_opt_projection_push_down is not set by default. Not critical issue.

@yibin87 yibin87 changed the title Projection push down to tikv leads to incorrect result Projection push down to tikv leads to incorrect result when subquery and agg Mar 19, 2024
@yibin87
Copy link
Contributor Author

yibin87 commented Mar 19, 2024

/assign @yibin87

@yibin87
Copy link
Contributor Author

yibin87 commented Mar 20, 2024

/affects 7.5

@yibin87
Copy link
Contributor Author

yibin87 commented Mar 20, 2024

/affects-7.5

@yibin87
Copy link
Contributor Author

yibin87 commented Mar 20, 2024

/label may-affects-5.4

@yibin87
Copy link
Contributor Author

yibin87 commented Mar 20, 2024

/may-affects-5.4

@yibin87
Copy link
Contributor Author

yibin87 commented Mar 20, 2024

/affect-7.5

@yibin87
Copy link
Contributor Author

yibin87 commented Mar 20, 2024

/label affects-7.5

@yibin87
Copy link
Contributor Author

yibin87 commented Mar 20, 2024

/label affects-7.1

@yibin87
Copy link
Contributor Author

yibin87 commented Mar 20, 2024

/label affects-6.5

@yibin87
Copy link
Contributor Author

yibin87 commented Mar 20, 2024

/label affects-6.1

@yibin87
Copy link
Contributor Author

yibin87 commented Mar 20, 2024

/label may-affects-5.4

@yibin87
Copy link
Contributor Author

yibin87 commented Mar 20, 2024

/unlabel may-affects-5.4

@yibin87
Copy link
Contributor Author

yibin87 commented Mar 20, 2024

/label affects-5.4

@ti-chi-bot ti-chi-bot bot added affects-5.4 This bug affects 5.4.x versions. and removed may-affects-5.4 This bug maybe affects 5.4.x versions. labels Mar 20, 2024
@yibin87
Copy link
Contributor Author

yibin87 commented Mar 20, 2024

/remove-label affects-5.4

@ti-chi-bot ti-chi-bot bot removed the affects-5.4 This bug affects 5.4.x versions. label Mar 20, 2024
@winoros winoros added sig/execution SIG execution and removed sig/planner SIG: Planner labels Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants