edponce commented on a change in pull request #11019:
URL: https://github.com/apache/arrow/pull/11019#discussion_r701399109



##########
File path: cpp/src/arrow/compute/api_vector.h
##########
@@ -252,6 +271,40 @@ ARROW_EXPORT
 Result<std::shared_ptr<Array>> NthToIndices(const Array& values, int64_t n,
                                             ExecContext* ctx = NULLPTR);
 
+/// @TODO
+ARROW_EXPORT
+Result<std::shared_ptr<Array>> TopK(const Array& values, int64_t k,
+                                    const std::string& keep = "first",
+                                    ExecContext* ctx = NULLPTR);
+
+/// @TODO
+ARROW_EXPORT
+Result<std::shared_ptr<Array>> TopK(const ChunkedArray& values, int64_t k,
+                                    const std::string& keep = "first",
+                                    ExecContext* ctx = NULLPTR);
+
+/// @TODO
+ARROW_EXPORT
+Result<Datum> TopK(const Datum& datum, int64_t k, SelectKOptions options,
+                   ExecContext* ctx = NULLPTR);
+
+/// @TODO
+ARROW_EXPORT
+Result<std::shared_ptr<Array>> BottomK(const Array& values, int64_t k,
+                                       const std::string& keep = "first",
+                                       ExecContext* ctx = NULLPTR);
+
+/// @TODO
+ARROW_EXPORT
+Result<std::shared_ptr<Array>> BottomK(const ChunkedArray& values, int64_t k,
+                                       const std::string& keep = "first",
+                                       ExecContext* ctx = NULLPTR);
+
+/// @TODO
+ARROW_EXPORT
+Result<Datum> BottomK(const Datum& datum, int64_t k, SelectKOptions options,

Review comment:
       Also, `keep_duplicates` can be part of the `SelectKOptions`, so that the 
API is of the form:
   ```c++
   Result<Datum> SelectK(const Datum& datum, SelectKOptions options = 
SelectKOptions::Defaults(), ExecContext* ctx = NULLPTR);
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to