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

Control the number of rows in chunks returned by SelectResult #9293

Merged
merged 4 commits into from
Feb 14, 2019

Conversation

qw4990
Copy link
Contributor

@qw4990 qw4990 commented Feb 13, 2019

What problem does this PR solve?

Control the number of rows in chunks returned by SelectResult.
This PR is a subtask of #9166.

What is changed and how it works?

  • Introduce requiredRows into Chunk to specify how many rows the parent executor want.
  • Introduce IsFull() into Chunk to judge if chunks are considered full by taking requiredRows into account.
  • Update selectResult and streamResult to support this feature.

Check List

Tests

  • Unit test

Code changes

  • Has exported function/method change

@qw4990 qw4990 added the sig/execution SIG execution label Feb 13, 2019
@qw4990 qw4990 requested review from lysu, zz-jason, XuHuaiyu and winoros and removed request for lysu and zz-jason February 13, 2019 08:13
@codecov-io
Copy link

codecov-io commented Feb 13, 2019

Codecov Report

Merging #9293 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #9293      +/-   ##
==========================================
+ Coverage   67.15%   67.17%   +0.02%     
==========================================
  Files         371      371              
  Lines       77496    77505       +9     
==========================================
+ Hits        52044    52066      +22     
+ Misses      20799    20787      -12     
+ Partials     4653     4652       -1
Impacted Files Coverage Δ
util/chunk/recordbatch.go 0% <ø> (ø) ⬆️
distsql/stream.go 58.57% <100%> (+0.23%) ⬆️
util/chunk/chunk.go 85.71% <100%> (+3.09%) ⬆️
distsql/select_result.go 74.39% <100%> (+0.89%) ⬆️
store/tikv/lock_resolver.go 41.7% <0%> (-0.95%) ⬇️
executor/distsql.go 72.53% <0%> (-0.47%) ⬇️
ddl/delete_range.go 77.77% <0%> (+2.64%) ⬆️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b9c5f55...2758adf. Read the comment docs.

util/chunk/chunk.go Outdated Show resolved Hide resolved
Copy link
Member

@zz-jason zz-jason left a comment

Choose a reason for hiding this comment

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

LGTM

lysu
lysu previously approved these changes Feb 14, 2019
Copy link
Contributor

@lysu lysu left a comment

Choose a reason for hiding this comment

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

LGTM

@lysu
Copy link
Contributor

lysu commented Feb 14, 2019

/run-all-tests

@qw4990
Copy link
Contributor Author

qw4990 commented Feb 14, 2019

/run-all-tests

@qw4990
Copy link
Contributor Author

qw4990 commented Feb 14, 2019

All checks have paased, PTAL~ @lysu

@qw4990 qw4990 added the status/LGT2 Indicates that a PR has LGTM 2. label Feb 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/execution SIG execution status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants