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

Fix outputoffset when build dag req #615

Merged

Conversation

zhexuany
Copy link
Contributor

@zhexuany zhexuany commented Mar 27, 2019

Say we have a query select id, id, it, it from t.
In the past, we construct a DAG req as follows:

table scan 
    addCol
        id, id, it, it
        0    1,  2 , 3
DAGReqBuilder
    addOutputOffset 
        0 1 2 3

It works in old TiKV, but not in the latest tikv.

The expected table scan is as follow:

table scan 
    addCol
        id, it
        0    1
DAGReqBuilder
    addOutputOffset 
        0 0 1 1

This PR fixes this.

@zhexuany
Copy link
Contributor Author

/run-all-tests

@codecov-io
Copy link

codecov-io commented Mar 28, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@ce6e612). Click here to learn what that means.
The diff coverage is 75%.

Impacted file tree graph

@@           Coverage Diff            @@
##             master    #615   +/-   ##
========================================
  Coverage          ?   53.9%           
  Complexity        ?     983           
========================================
  Files             ?     136           
  Lines             ?    6402           
  Branches          ?     759           
========================================
  Hits              ?    3451           
  Misses            ?    2626           
  Partials          ?     325
Impacted Files Coverage Δ Complexity Δ
...cap/tikv/operation/iterator/CoprocessIterator.java 56.66% <ø> (ø) 5 <0> (?)
.../main/java/com/pingcap/tikv/meta/TiDAGRequest.java 41.1% <75%> (ø) 46 <0> (?)

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 ce6e612...1f8ca81. Read the comment docs.

@marsishandsome
Copy link
Collaborator

it will be better if bug fixing & refactor are in separated PR

@zhexuany
Copy link
Contributor Author

/run-all-tests tikv=release-2.1 tidb=release-2.1 pd=release-2.1

@marsishandsome
Copy link
Collaborator

LGTM

@zhexuany zhexuany force-pushed the fix_outputoffset_when_build_dag_req branch 2 times, most recently from 8a07409 to 5e1d65b Compare March 28, 2019 05:52
@zhexuany
Copy link
Contributor Author

@marsishandsome PTAL. In this PR, only fix will be merged into master.

@zhexuany zhexuany force-pushed the fix_outputoffset_when_build_dag_req branch from 28251af to 1f8ca81 Compare March 28, 2019 06:37
@zhexuany
Copy link
Contributor Author

/run-all-tests

Copy link
Contributor

@birdstorm birdstorm left a comment

Choose a reason for hiding this comment

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

LGTM computeIfAbsent would be better, but we can leave it to next PR.

@marsishandsome
Copy link
Collaborator

LGTM

@zhexuany zhexuany merged commit 2e9b181 into pingcap:master Mar 28, 2019
@zhexuany zhexuany deleted the fix_outputoffset_when_build_dag_req branch March 28, 2019 08:06
zhexuany added a commit to zhexuany/tispark that referenced this pull request Apr 2, 2019
zhexuany added a commit to zhexuany/tispark that referenced this pull request Apr 2, 2019
wfxxh pushed a commit to wanfangdata/tispark that referenced this pull request Jun 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants