tadeja commented on code in PR #55759:
URL: https://github.com/apache/arrow/pull/55759#discussion_r4786512168


##########
python/pyarrow/compute.py:
##########
@@ -567,6 +567,27 @@ def fill_null(values, fill_value):
     return call_function("coalesce", [values, fill_value])
 
 
+def _select_k_sort_keys(values, sort_keys, null_placements, order):
+    if isinstance(values, (pa.Array, pa.ChunkedArray)):
+        if sort_keys is not None:
+            raise ValueError(
+                "sort_keys is only supported for table-like input")
+        return [("dummy", order, "at_end")]

Review Comment:
   Might have been there before that `null_placements` "at_start" gets ignored 
(behaves like "at_end") for arrays - probably good to fix this now anyway?
   ```
   pc.top_k_unstable(pa.array([1, None, 2]), 2, null_placements=["at_start"])
   ```
   <pyarrow.lib.UInt64Array object at 0x10c8e9ba0>
   [
     2,
     0
   ]
   
   Also invalid value like `null_placements=1` gets accepted.



-- 
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]

Reply via email to