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(optimizer): fix lost projection pk #3119

Merged
merged 1 commit into from
Jun 10, 2022
Merged

fix(optimizer): fix lost projection pk #3119

merged 1 commit into from
Jun 10, 2022

Conversation

skyzh
Copy link
Contributor

@skyzh skyzh commented Jun 10, 2022

Signed-off-by: Alex Chi iskyzh@gmail.com

What's changed and what's your intention?

The original implementation of projection pk selection seems wrong -- if any key is filtered from pk, then all pks are lost.

Note that this PR still doesn't solve .#3118

Checklist

  • I have written necessary docs and comments
  • I have added necessary unit tests and integration tests
  • All checks passed in ./risedev check (or alias, ./risedev c)

Refer to a related PR or issue link (optional)

close #3086

Signed-off-by: Alex Chi <iskyzh@gmail.com>
@skyzh skyzh requested review from fuyufjh and st1page June 10, 2022 04:24
@github-actions github-actions bot added the type/fix Bug fix label Jun 10, 2022
@skyzh skyzh enabled auto-merge (squash) June 10, 2022 04:26
@codecov
Copy link

codecov bot commented Jun 10, 2022

Codecov Report

Merging #3119 (964e1b3) into main (9a34de4) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #3119      +/-   ##
==========================================
- Coverage   73.63%   73.63%   -0.01%     
==========================================
  Files         736      736              
  Lines      101546   101545       -1     
==========================================
- Hits        74776    74774       -2     
- Misses      26770    26771       +1     
Flag Coverage Δ
rust 73.63% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...rontend/src/optimizer/plan_node/logical_project.rs 98.93% <100.00%> (-0.01%) ⬇️
src/meta/src/hummock/mock_hummock_meta_client.rs 42.39% <0.00%> (-1.09%) ⬇️
src/storage/src/hummock/local_version_manager.rs 84.12% <0.00%> (-0.16%) ⬇️
src/meta/src/barrier/mod.rs 69.45% <0.00%> (+0.32%) ⬆️

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@skyzh skyzh merged commit 53147ab into main Jun 10, 2022
@skyzh skyzh deleted the skyzh/fix-pk-simpleagg branch June 10, 2022 04:51
@st1page
Copy link
Contributor

st1page commented Jun 13, 2022

sorry for the late reply

if any key is filtered from pk, then all pks are lost

I think we should do that... we need we can identify a row with the pks. so if a key is removed by projection, then we can not give any pk of the result. for example if there is a table(a,b,c) with pk(a,b) and rows(1,2,3), (1,3,3), and we do projection to remove the second column, then the result is rows (1,3), (1,3). there is no pk for the result.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/fix Bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

invalid flush status: double insert
3 participants