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

Updated sort.rs to show TopK #7751

Closed
wants to merge 1 commit into from

Conversation

Night-Amber3301
Copy link
Contributor

@Night-Amber3301 Night-Amber3301 commented Oct 6, 2023

Closes: #7750

Replaced SortExec: fetch={fetch}, expr=[{}] with SortExec: TopK(fetch={fetch}), expr=[{}] in sort.rs file

solves: apache#7750

Replaced `SortExec: fetch={fetch}, expr=[{}]` with 'SortExec: TopK(fetch={fetch}), expr=[{}]' in [sort.rs](https://github.com/apache/arrow-datafusion/blob/main/datafusion/physical-plan/src/sorts/sort.rs) file
@alamb alamb changed the title Updated sort.rs Updated sort.rs to show TopK Oct 6, 2023
@alamb
Copy link
Contributor

alamb commented Oct 6, 2023

This looks really close @Night-Amber3301 -- thank you. I think some of the clippy errors will be resolved if you merge up from main. And it looks like there are just a few more tests to update

Let me know if you would like to some help and thanks agian!

@Night-Amber3301
Copy link
Contributor Author

Yeah sure, thanks for consideration, I would love to work on it, will go through it in a while.

@Night-Amber3301
Copy link
Contributor Author

I've merged it up from main, please check it out.

Thanks!

@alamb
Copy link
Contributor

alamb commented Oct 7, 2023

I've merged it up from main, please check it out.

It looks like somehow your changes were not pushed to github (the UI doesn't show any new changes)

@Night-Amber3301
Copy link
Contributor Author

Any suggestions on why is this happening?

@alamb
Copy link
Contributor

alamb commented Oct 7, 2023

Any suggestions on why is this happening?

Perhaps you haven't pushed the change to github? What command are you using?

I would expect you would hav to do something like

git push

And make sure your "upstream" was set to your fork

@liukun4515
Copy link
Contributor

Any suggestions on why is this happening?

Can you provide your git log to here?

you can get the git log by

git log

in your project workspace

@Night-Amber3301
Copy link
Contributor Author

@liukun4515 Here are the logs:

@Night-Amber3301 ➜ /workspaces/arrow-datafusion (patch-1) $ git log
commit 29e2dc3 (HEAD -> patch-1, origin/patch-1)
Author: Pratibhanu Jarngal [email protected]
Date: Fri Oct 6 10:38:20 2023 +0530

Updated sort.rs

solves: #7750

Replaced `SortExec: fetch={fetch}, expr=[{}]` with 'SortExec: TopK(fetch={fetch}), expr=[{}]' in [sort.rs](https://github.com/apache/arrow-datafusion/blob/main/datafusion/physical-plan/src/sorts/sort.rs) file

@@ -769,7 +769,7 @@ impl DisplayAs for SortExec {
write!(
f,
// TODO should this say topk?
"SortExec: fetch={fetch}, expr=[{}]",
"SortExec: TopK(fetch={fetch}), expr=[{}]",
Copy link
Member

@Weijun-H Weijun-H Oct 7, 2023

Choose a reason for hiding this comment

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

If the sort does not use TopK, should we keep the format like "SortExec: fetch={fetch}, expr=[{}]" 🤔?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, I think that is the intention

@alamb
Copy link
Contributor

alamb commented Oct 10, 2023

Marking as draft as this PR is not waiting on feedback. Please mark it as ready for review when it is next ready

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.

Update explain plan to show when topk operator is used
4 participants