-
Notifications
You must be signed in to change notification settings - Fork 918
Consider removing skip
from RowSelector
#7450
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
Comments
If we are going to change how Related ticket: |
I filed an epic that tries to explain the overall goal Here is a related ticket where @tustvold describes some other ideas to improve RowSelections: |
Thanks for connecting the issues! Motivating this issue to remove |
Like always, @XiangpengHao was ahead of us, and he also mentioned the size of the RowSelector in #7363 (comment) |
BTW there is already a row-selector benchmark: |
But this makes concatenating/slicing selectors tricker, and can not accept row selectors that have two consecutive select/skip. I'll prefer using a sentinel value to represent skip/select. |
Another potential option might be an enum like this: enum RowSelector {
Skip(usize),
Scan(usize),
Bitmap(BooleanBuffer),
}
`` |
It seems just adding "0" on odd elements to denote "select 0" gives the same meaning?
Skip (5), Skip(5) is identical to Skip(10), so what would be the benefit from having consecutive select/skip?
Downside is that it is also 16 bytes per element instead of 8. |
The nice thing is |
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
Currently
RowSelector
contains apub skip: bool
which means that the rows in the row selector needs to be skipped or not.However, this field is not very useful as an optimal representation of a
RowSelector
will always be alternating selected and skipped rows.I think we should consider dropping the
skip
field in order to simplify the api (and speed up / reduce memory overhead (from 16 to 8 bytes per element) as well).We can represent a
RowSelector
as array of alternating select / skip / select rows.e.g. :
[0, 10, 5, 10, 5] => select 0, skip 10, select 5, skip 10, select 5
Describe the solution you'd like
Drop the
skip
field, update implementation to take care of the new representation (select / skip based on alternation rather than via the field, (even/odd)).Describe alternatives you've considered
Other representation, e.g. Vec<Range<..>>
Additional context
The text was updated successfully, but these errors were encountered: