lidavidm commented on a change in pull request #11019:
URL: https://github.com/apache/arrow/pull/11019#discussion_r701071261
##########
File path: cpp/src/arrow/compute/api_vector.cc
##########
@@ -140,6 +144,15 @@ PartitionNthOptions::PartitionNthOptions(int64_t pivot)
: FunctionOptions(internal::kPartitionNthOptionsType), pivot(pivot) {}
constexpr char PartitionNthOptions::kTypeName[];
+SelectKOptions::SelectKOptions(int64_t k, std::vector<std::string> keys,
std::string keep,
+ SortOrder order)
+ : FunctionOptions(internal::kSelectKOptionsType),
+ k(k),
+ keys(std::move(keys)),
+ keep(keep),
+ order(order) {}
+constexpr char SelectKOptions::kTypeName[];
+
Review comment:
`keep` comes from Pandas
[nlargest/nsmallest](https://pandas.pydata.org/docs/reference/api/pandas.core.groupby.SeriesGroupBy.nlargest.html)
however it is not meaningful here unless there is an ordering defined on the
dataset.
`keys` is because you may wish to sort on one column but take values from
another. However, as mentioned below, if indices were returned instead of
values, you could do this yourself instead of having to build it into the
kernel.
--
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]