-
Notifications
You must be signed in to change notification settings - Fork 33
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
Add FilterFn trait + default implementation #458
Conversation
/// | ||
/// We expect to change this soon once DataFusion is able to finish up some initial support, which | ||
/// is tracked in https://github.com/apache/datafusion/issues/10918. | ||
/// is tracked in <https://github.com/apache/datafusion/issues/10918>. |
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 were cleanups to make cargo doc -p vortex-array
complete cleanly
|
||
array.with_dyn(|a| { | ||
if let Some(filter_fn) = a.filter() { | ||
Ok(filter_fn.filter(array)) |
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.
Should this be filter_fn.filter(predicate)
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.
Whoops, yes
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.
Ill fix it in a follow up.
|
||
pub trait FilterFn { | ||
/// Filter an array by the provided predicate. | ||
fn filter(&self, predicate: &Array) -> Array; |
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.
What do you think about moving to this taking a &dyn BoolArrayTrait
?
Implement
filter
and correspondingFilterFn
array traitSee #439