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(frontend): fix TopN in frontend to be compatible with current implementation #2129

Merged
merged 5 commits into from
Apr 25, 2022

Conversation

fuyufjh
Copy link
Contributor

@fuyufjh fuyufjh commented Apr 25, 2022

What's changed and what's your intention?

The current implementation of TopN in Java frontend & compute node assumes its PK should be exactly the same with sort keys, so the PK of TopN = sort_key + input.pk. This PR changes Rust frontend's behavior to be compatible with that.

However, The PK of TopN should be the input's PK instead of sort_key + input.pk. To fix this, we need to change proto, compute nodes and rust & java frontend simultaneously. Let do this later.

I've also added some e2e tests for order-by queries.

Checklist

  • I have written necessary docs and comments
  • I have added necessary unit tests and integration tests

Refer to a related PR or issue link (optional)

@fuyufjh fuyufjh requested review from skyzh and lmatz April 25, 2022 11:51
@github-actions github-actions bot added the type/fix Bug fix label Apr 25, 2022
Copy link
Contributor

@skyzh skyzh left a comment

Choose a reason for hiding this comment

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

LGTM

src/frontend/test_runner/tests/testdata/struct_query.yaml Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Apr 25, 2022

Codecov Report

Merging #2129 (0e46b56) into main (564dd08) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #2129   +/-   ##
=======================================
  Coverage   70.83%   70.83%           
=======================================
  Files         640      640           
  Lines       81485    81501   +16     
=======================================
+ Hits        57717    57734   +17     
+ Misses      23768    23767    -1     
Flag Coverage Δ
rust 70.83% <100.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
...c/frontend/src/optimizer/plan_node/logical_topn.rs 90.26% <100.00%> (ø)
...rc/frontend/src/optimizer/plan_node/stream_topn.rs 69.84% <100.00%> (+10.26%) ⬆️
src/common/src/types/ordered_float.rs 24.30% <0.00%> (+0.19%) ⬆️

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

@fuyufjh fuyufjh merged commit 02e11b6 into main Apr 25, 2022
@fuyufjh fuyufjh deleted the eric/fix_topn_rust_fe branch April 25, 2022 12:16
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.

None yet

2 participants