-
Notifications
You must be signed in to change notification settings - Fork 735
YQL-18356: Refactor WideTopSort to be able use LLVM compilation #5109
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
YQL-18356: Refactor WideTopSort to be able use LLVM compilation #5109
Conversation
|
⚪ |
|
⚪ |
|
⚪
|
|
⚪
|
d2ee9e1 to
a537476
Compare
|
⚪
|
|
⚪
|
|
⚪
|
|
⚪
|
| // Remove placeholder for new data | ||
| Storage.resize(Storage.size() - Indexes.size()); | ||
|
|
||
| Full.reserve(Storage.size() / Indexes.size()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have guarantees that Indexes.size() is not 0?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Indexes size is the number of input columns to the callable.
| } | ||
|
|
||
| Free.clear(); | ||
| Free.shrink_to_fit(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cppref says that shrink_to_fit is not obliged to actually shrink:
https://en.cppreference.com/w/cpp/container/vector/shrink_to_fit
As far as I know the only way to completely clear container is to swap it with empty container
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, I kept the previous implementation.
I think we should be fine for now: https://stackoverflow.com/questions/23502291/is-shrink-to-fit-the-proper-way-of-reducing-the-capacity-a-stdvector-to-its/23503995#23503995
Changelog entry
...
Changelog category
Additional information
...