This is an automated email from the ASF dual-hosted git repository.
tustvold pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow-rs.git
The following commit(s) were added to refs/heads/master by this push:
new 0ef18481b Deprecate limit kernel (#3200)
0ef18481b is described below
commit 0ef18481bd44a08fe041aa23c7b97b0c4695a024
Author: Raphael Taylor-Davies <[email protected]>
AuthorDate: Sat Nov 26 20:38:41 2022 +0000
Deprecate limit kernel (#3200)
---
arrow/src/compute/kernels/limit.rs | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arrow/src/compute/kernels/limit.rs
b/arrow/src/compute/kernels/limit.rs
index 7b8f519cf..1f6c6aec5 100644
--- a/arrow/src/compute/kernels/limit.rs
+++ b/arrow/src/compute/kernels/limit.rs
@@ -25,12 +25,14 @@ use crate::array::ArrayRef;
/// where:
/// * it performs a bounds-check on the array
/// * it slices from offset 0
+#[deprecated(note = "Use Array::slice")]
pub fn limit(array: &ArrayRef, num_elements: usize) -> ArrayRef {
let lim = num_elements.min(array.len());
array.slice(0, lim)
}
#[cfg(test)]
+#[allow(deprecated)]
mod tests {
use super::*;
use crate::array::*;