Skip to content

Commit

Permalink
feat: is_in support for array dtype (pola-rs#13559)
Browse files Browse the repository at this point in the history
  • Loading branch information
reswqa authored Jan 10, 2024
1 parent cc3aa49 commit 32c074e
Show file tree
Hide file tree
Showing 4 changed files with 416 additions and 168 deletions.
12 changes: 12 additions & 0 deletions crates/polars-core/src/utils/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,18 @@ macro_rules! apply_method_all_arrow_series {
}
}

#[macro_export]
macro_rules! apply_amortized_generic_list_or_array {
($self:expr, $method:ident, $($args:expr),*) => {
match $self.dtype() {
#[cfg(feature = "dtype-array")]
DataType::Array(_, _) => $self.array().unwrap().apply_amortized_generic($($args),*),
DataType::List(_) => $self.list().unwrap().apply_amortized_generic($($args),*),
_ => unimplemented!(),
}
}
}

#[macro_export]
macro_rules! apply_method_physical_integer {
($self:expr, $method:ident, $($args:expr),*) => {
Expand Down
Loading

0 comments on commit 32c074e

Please sign in to comment.