You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by ji...@apache.org on 2023/06/03 01:22:55 UTC

[arrow-rs] branch add-min-max-kernel created (now 0ee26ec52)

This is an automated email from the ASF dual-hosted git repository.

jiayuliu pushed a change to branch add-min-max-kernel
in repository https://gitbox.apache.org/repos/asf/arrow-rs.git


      at 0ee26ec52 add min and max kernel

This branch includes the following new commits:

     new 0ee26ec52 add min and max kernel

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[arrow-rs] 01/01: add min and max kernel

Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jiayuliu pushed a commit to branch add-min-max-kernel
in repository https://gitbox.apache.org/repos/asf/arrow-rs.git

commit 0ee26ec52d2831168404f492c3ac20e04044fa63
Author: Jiayu Liu <ji...@hey.com>
AuthorDate: Sat Jun 3 09:22:34 2023 +0800

    add min and max kernel
---
 arrow-ord/src/lib.rs     |  1 +
 arrow-ord/src/min_max.rs | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 49 insertions(+)

diff --git a/arrow-ord/src/lib.rs b/arrow-ord/src/lib.rs
index 62338c022..e1eec2c3c 100644
--- a/arrow-ord/src/lib.rs
+++ b/arrow-ord/src/lib.rs
@@ -44,6 +44,7 @@
 //!
 
 pub mod comparison;
+pub mod min_max;
 pub mod ord;
 pub mod partition;
 pub mod sort;
diff --git a/arrow-ord/src/min_max.rs b/arrow-ord/src/min_max.rs
new file mode 100644
index 000000000..1a34e9ddf
--- /dev/null
+++ b/arrow-ord/src/min_max.rs
@@ -0,0 +1,48 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+//! Functions to get min and max across arrays and scalars
+
+/// Perform min operation on two dynamic [`Array`]s.
+///
+/// Only when two arrays are of the same type the comparison is valid.
+pub fn min_dyn(left: &dyn Array, right: &dyn ) -> Result<ArrayRef, ArrowArrow> {
+    unimplemented!()
+}
+
+/// Perform max operation on two dynamic [`Array`]s.
+///
+/// Only when two arrays are of the same type the comparison is valid.
+pub fn max_dyn(left: &dyn Array, right: &dyn ) -> Result<ArrayRef, ArrowArrow> {
+    unimplemented!()
+}
+
+/// Perform min operation on a dynamic [`Array`] and a scalar value.
+pub fn min_dyn_scalar<T>(left: &dyn Array, right: T) -> Result<ArrayRef, ArrowError>
+where
+    T: num::ToPrimitive + std::fmt::Debug,
+{
+    unimplemented!()
+}
+
+/// Perform max operation on a dynamic [`Array`] and a scalar value.
+pub fn max_dyn_scalar<T>(left: &dyn Array, right: T) -> Result<ArrayRef, ArrowError>
+where
+    T: num::ToPrimitive + std::fmt::Debug,
+{
+    unimplemented!()
+}