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

Normalized plan is not following the same format #31438

Closed
breezewish opened this issue Jan 7, 2022 · 3 comments · Fixed by #31560
Closed

Normalized plan is not following the same format #31438

breezewish opened this issue Jan 7, 2022 · 3 comments · Fixed by #31560
Assignees
Labels
severity/minor sig/planner SIG: Planner type/bug The issue is confirmed as a bug.

Comments

@breezewish
Copy link
Member

breezewish commented Jan 7, 2022

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

Execute any workload with a coprocessor push down.

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

For the normalized plan, we should know that the push down happens for TiKV or TiFlash, like:

	StreamAgg_17           	root     	...
	└─IndexReader_18       	root     	...
	  └─StreamAgg_9        	cop[tikv]	...
	    └─IndexRangeScan_16	cop[tikv]	...

3. What did you see instead (Required)

No TiKV or TiFlash push down information is included in the normalized plan:

	StreamAgg           	root	funcs:count(?)->?
	└─IndexReader       	root	index:StreamAgg_9
	  └─StreamAgg       	cop 	funcs:count(test.sbtest1.k)->?
	    └─IndexRangeScan	cop 	table:sbtest1, index:k_1(k), range:[?,?], keep order:false

Note that this is not the first time that a plan output is not displayed in the same way:

#28731

4. What is your TiDB version? (Required)

v5.4.0

@crazycs520
Copy link
Contributor

The expected result should be:

	StreamAgg           	root	funcs:count(?)->?
	└─IndexReader       	root	index:StreamAgg
	  └─StreamAgg       	cop[tikv] 	funcs:count(test.sbtest1.k)->?
	    └─IndexRangeScan	cop[tikv] 	table:sbtest1, index:k_1(k), range:[?,?], keep order:false

And since the IndexReader will always has 1 child, so the expected result can be:

	StreamAgg           	root	funcs:count(?)->?
	└─IndexReader       	root
	  └─StreamAgg       	cop[tikv] 	funcs:count(test.sbtest1.k)->?
	    └─IndexRangeScan	cop[tikv] 	table:sbtest1, index:k_1(k), range:[?,?], keep order:false

@crazycs520
Copy link
Contributor

The plan with different cop task should has different plan digest , This PR #20054 fix it.

@github-actions
Copy link

Please check whether the issue should be labeled with 'affects-x.y' or 'fixes-x.y.z', and then remove 'needs-more-info' label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/minor sig/planner SIG: Planner type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants