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

Refactor sel vector interface #3177

Merged
merged 1 commit into from
Mar 31, 2024
Merged

Conversation

andyfengHKU
Copy link
Contributor

@andyfengHKU andyfengHKU commented Mar 31, 2024

This PR ends up being a pure renaming PR.

We rename resetSelectorToUnselected to setToUnfiltered to be consistent with isUnfiltered. And resetSelectorToValuePosBuffer to setToMutable. The reasons are as follow

  • reset has a very specific meaning of setting to initial state. Out interface in SelVector clearly not qualify this notion.
  • resetSelectorToValuePosBuffer is quite confusing because developer do not know what ValuePosBuffer is suppose to be. We should avoid name an interface by naively describing a code block (e.g. resetSelectorToValuePosBuffer is just describing selectedPositions = selectedPositionsBuffer.get();). Instead, call it setToMutable makes more sense because by default selectedPositions points to a static array that is immutable.

I also take the chance to examine if we were using SelVector wrongly. I spot a few pieces where @ray6080 should comment as it is storage code.

Copy link

codecov bot commented Mar 31, 2024

Codecov Report

Attention: Patch coverage is 95.83333% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 92.21%. Comparing base (fa528c1) to head (24c39a0).

Files Patch % Lines
src/storage/store/column_chunk.cpp 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3177      +/-   ##
==========================================
- Coverage   92.21%   92.21%   -0.01%     
==========================================
  Files        1171     1171              
  Lines       44127    44125       -2     
==========================================
- Hits        40693    40690       -3     
- Misses       3434     3435       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

src/include/common/data_chunk/sel_vector.h Outdated Show resolved Hide resolved
src/storage/store/column_chunk.cpp Show resolved Hide resolved
src/storage/store/var_list_column_chunk.cpp Show resolved Hide resolved
@andyfengHKU andyfengHKU force-pushed the refactor-sel-vector-interface branch from d55454a to 24c39a0 Compare March 31, 2024 04:58
@andyfengHKU andyfengHKU merged commit 4e406a1 into master Mar 31, 2024
17 checks passed
@andyfengHKU andyfengHKU deleted the refactor-sel-vector-interface branch March 31, 2024 05:46
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.

None yet

2 participants