-
Notifications
You must be signed in to change notification settings - Fork 0
Split RowSelectionPolicy from RowSelectionStrategy #9
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
Conversation
94d5737 to
631cb17
Compare
| } | ||
| } | ||
|
|
||
| /// Fully resolved strategy for materializing [`RowSelection`] during execution. |
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.
I eventually concluded that using a separate enum for the actual strategy to use was the clearest -- that way the type system encodes when Auto must have been resolved
| } | ||
| plan_builder = plan_builder.with_row_selection_policy(self.row_selection_policy); | ||
|
|
||
| plan_builder = overide_selector_strategy_if_needed( |
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.
I also extracted this logic out into its own function, mostly so I could add the comments from apache#8733 (comment)
|
|
||
| /// Overrider the selection strategy if needed. | ||
| /// | ||
| /// Some pages can be skipped during row-group construction of they are not read |
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.
these are based on apache#8733 (comment)
| Auto { | ||
| /// Average selector length below which masks are preferred | ||
| threshold: usize, | ||
| /// Fallback to selectors when mask would be unsafe (e.g. page skipping) |
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.
safe was always set to true, so I removed it as I believe it is redundant
This is another PR that targets
There were several places in the code that assumed RowSelectionStrategy couldn't be
Auto-- I wanted to see if I could encode this into the type system so it was less potentially problematicI also think the context from @hhhizzz on apache#8733 (comment) was very important context so I adapted it as comments