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

planner: add unit test for tidb_opt_prefer_range_scan variable #20672

Merged
merged 3 commits into from
Nov 13, 2020

Conversation

xiaodong-ji
Copy link
Contributor

What problem does this PR solve?

Problem Summary:

What is changed and how it works?

What's Changed: add unit test for tidb_opt_prefer_range_scan variable.

Related changes

Check List

Tests

  • Unit test

Release note

  • add unit test for tidb_opt_prefer_range_scan variable

@xiaodong-ji xiaodong-ji requested a review from a team as a code owner October 27, 2020 08:42
@xiaodong-ji xiaodong-ji requested review from hanfei1991 and removed request for a team October 27, 2020 08:42
@xiaodong-ji
Copy link
Contributor Author

/run-check_dev_2

@qw4990 qw4990 self-requested a review October 28, 2020 06:22
@qw4990 qw4990 added the sig/planner SIG: Planner label Oct 28, 2020
@qw4990 qw4990 requested a review from winoros October 28, 2020 06:23
@xiaodong-ji
Copy link
Contributor Author

/run-check_dev_2

@ti-srebot
Copy link
Contributor

@winoros, @qw4990, @hanfei1991, PTAL.

2 similar comments
@ti-srebot
Copy link
Contributor

@winoros, @qw4990, @hanfei1991, PTAL.

@ti-srebot
Copy link
Contributor

@winoros, @qw4990, @hanfei1991, PTAL.

Copy link
Member

@winoros winoros left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@ti-srebot ti-srebot added the status/LGT1 Indicates that a PR has LGTM 1. label Nov 13, 2020
Copy link
Contributor

@qw4990 qw4990 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ti-srebot ti-srebot removed the status/LGT1 Indicates that a PR has LGTM 1. label Nov 13, 2020
@ti-srebot ti-srebot added the status/LGT2 Indicates that a PR has LGTM 2. label Nov 13, 2020
@qw4990
Copy link
Contributor

qw4990 commented Nov 13, 2020

/merge

@ti-srebot ti-srebot added the status/can-merge Indicates a PR has been approved by a committer. label Nov 13, 2020
@ti-srebot
Copy link
Contributor

Your auto merge job has been accepted, waiting for:

  • 20744

@ti-srebot
Copy link
Contributor

/run-all-tests

@ti-srebot ti-srebot merged commit 5aada1f into pingcap:master Nov 13, 2020
@lzmhhh123
Copy link
Contributor

The test is often failed:

[2020-11-23T09:45:42.107Z] physical_plan_test.go:1731:

[2020-11-23T09:45:42.107Z]     tk.MustQuery("explain " + ts).Check(testkit.Rows(output[i].Plan...))

[2020-11-23T09:45:42.107Z] /home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/util/testkit/testkit.go:63:

[2020-11-23T09:45:42.107Z]     res.c.Assert(resBuff.String(), check.Equals, needBuff.String(), res.comment)

[2020-11-23T09:45:42.107Z] ... obtained string = "" +

[2020-11-23T09:45:42.107Z] ...     "[IndexLookUp_7 1441.12 root  ]\n" +

[2020-11-23T09:45:42.107Z] ...     "[├─IndexRangeScan_5(Build) 1441.12 cop[tikv] table:test, index:idx_age(age) range:[5,5], keep order:false]\n" +

[2020-11-23T09:45:42.108Z] ...     "[└─TableRowIDScan_6(Probe) 1441.12 cop[tikv] table:test keep order:false]\n"

[2020-11-23T09:45:42.108Z] ... expected string = "" +

[2020-11-23T09:45:42.108Z] ...     "[IndexLookUp_7 2048.00 root  ]\n" +

[2020-11-23T09:45:42.108Z] ...     "[├─IndexRangeScan_5(Build) 2048.00 cop[tikv] table:test, index:idx_age(age) range:[5,5], keep order:false]\n" +

[2020-11-23T09:45:42.108Z] ...     "[└─TableRowIDScan_6(Probe) 2048.00 cop[tikv] table:test keep order:false]\n"

Could you take a look?

@xiaodong-ji
Copy link
Contributor Author

The test is often failed:

[2020-11-23T09:45:42.107Z] physical_plan_test.go:1731:

[2020-11-23T09:45:42.107Z]     tk.MustQuery("explain " + ts).Check(testkit.Rows(output[i].Plan...))

[2020-11-23T09:45:42.107Z] /home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/util/testkit/testkit.go:63:

[2020-11-23T09:45:42.107Z]     res.c.Assert(resBuff.String(), check.Equals, needBuff.String(), res.comment)

[2020-11-23T09:45:42.107Z] ... obtained string = "" +

[2020-11-23T09:45:42.107Z] ...     "[IndexLookUp_7 1441.12 root  ]\n" +

[2020-11-23T09:45:42.107Z] ...     "[├─IndexRangeScan_5(Build) 1441.12 cop[tikv] table:test, index:idx_age(age) range:[5,5], keep order:false]\n" +

[2020-11-23T09:45:42.108Z] ...     "[└─TableRowIDScan_6(Probe) 1441.12 cop[tikv] table:test keep order:false]\n"

[2020-11-23T09:45:42.108Z] ... expected string = "" +

[2020-11-23T09:45:42.108Z] ...     "[IndexLookUp_7 2048.00 root  ]\n" +

[2020-11-23T09:45:42.108Z] ...     "[├─IndexRangeScan_5(Build) 2048.00 cop[tikv] table:test, index:idx_age(age) range:[5,5], keep order:false]\n" +

[2020-11-23T09:45:42.108Z] ...     "[└─TableRowIDScan_6(Probe) 2048.00 cop[tikv] table:test keep order:false]\n"

Could you take a look?

This error is caused by the wrong number of rows in the table

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/planner SIG: Planner status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants