aocsa commented on a change in pull request #11019:
URL: https://github.com/apache/arrow/pull/11019#discussion_r703893700
##########
File path: cpp/src/arrow/compute/api_vector.h
##########
@@ -252,6 +296,53 @@ ARROW_EXPORT
Result<std::shared_ptr<Array>> NthToIndices(const Array& values, int64_t n,
ExecContext* ctx = NULLPTR);
+/// \brief Returns the first k elements ordered by `options.keys`.
+///
+/// Return a sorted array with its elements rearranged in such
+/// a way that the value of the element in k-th position (options.k) is in the
position it
+/// would be in a sorted datum ordered by `options.keys`. Null like values
will be not
+/// part of the output. Output is not guaranteed to be stable.
+///
+/// \param[in] datum datum to be partitioned
+/// \param[in] options options
+/// \param[in] ctx the function execution context, optional
+/// \return a datum with the same schema as the input
+
+ARROW_EXPORT
+Result<std::shared_ptr<Array>> SelectK(const Datum& datum, SelectKOptions
options,
+ ExecContext* ctx = NULLPTR);
Review comment:
all these APIs need options and is not optional, similiar to
`SortIndices` API:
```
Result<std::shared_ptr<Array>> SortIndices(const Datum& datum, const
SortOptions& options,
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]