diff --git a/clippy.toml b/clippy.toml index ec39e9871d72..bec822eb6e8f 100644 --- a/clippy.toml +++ b/clippy.toml @@ -50,13 +50,17 @@ disallowed-methods = [ { path = "std::panic::catch_unwind", reason = "We compile with `panic = 'abort'`" }, { path = "std::thread::spawn", reason = "Use `std::thread::Builder` and name the thread" }, + { path = "arrow::compute::concat", reason = "Use `re_chunk::arrow_util::concat_arrays` instead, which has better memory management" }, + { path = "arrow::compute::filter", reason = "Use `re_chunk::arrow_util::filter_array` instead" }, + { path = "arrow::compute::take", reason = "Use `re_chunk::arrow_util::take_array` instead" }, + # Specify both `arrow2` and `re_arrow2` -- clippy gets lost in all the package renaming happening. - { path = "arrow2::compute::concatenate::concatenate", reason = "Use `re_chunk::util::concat_arrays` instead, which has proper early outs" }, - { path = "arrow2::compute::filter::filter", reason = "Use `re_chunk::util::filter_array` instead, which has proper early outs" }, - { path = "arrow2::compute::take::take", reason = "Use `re_chunk::util::take_array` instead, which has proper early outs" }, - { path = "re_arrow2::compute::concatenate::concatenate", reason = "Use `re_chunk::util::concat_arrays` instead, which has proper early outs" }, - { path = "re_arrow2::compute::filter::filter", reason = "Use `re_chunk::util::filter_array` instead, which has proper early outs" }, - { path = "re_arrow2::compute::take::take", reason = "Use `re_chunk::util::take_array` instead, which has proper early outs" }, + { path = "arrow2::compute::concatenate::concatenate", reason = "Use `re_chunk::arrow2_util::concat_arrays` instead, which has proper early outs" }, + { path = "arrow2::compute::filter::filter", reason = "Use `re_chunk::arrow2_util::filter_array` instead, which has proper early outs" }, + { path = "arrow2::compute::take::take", reason = "Use `re_chunk::arrow2_util::take_array` instead, which has proper early outs" }, + { path = "re_arrow2::compute::concatenate::concatenate", reason = "Use `re_chunk::arrow2_util::concat_arrays` instead, which has proper early outs" }, + { path = "re_arrow2::compute::filter::filter", reason = "Use `re_chunk::arrow2_util::filter_array` instead, which has proper early outs" }, + { path = "re_arrow2::compute::take::take", reason = "Use `re_chunk::arrow2_util::take_array` instead, which has proper early outs" }, # There are many things that aren't allowed on wasm, # but we cannot disable them all here (because of e.g. https://github.com/rust-lang/rust-clippy/issues/10406) diff --git a/crates/store/re_chunk/src/arrow_util.rs b/crates/store/re_chunk/src/arrow_util.rs index 856b7dc3ce2c..46d4dca005eb 100644 --- a/crates/store/re_chunk/src/arrow_util.rs +++ b/crates/store/re_chunk/src/arrow_util.rs @@ -216,7 +216,9 @@ pub fn new_list_array_of_empties(child_datatype: &DataType, len: usize) -> ListA /// /// Returns an error if the arrays don't share the exact same datatype. pub fn concat_arrays(arrays: &[&dyn Array]) -> arrow::error::Result { + #[allow(clippy::disallowed_methods)] // that's the whole point arrow::compute::concat(arrays) + // TODO: call .shrink_to_fit on the result } /// Applies a [filter] kernel to the given `array`.