Light-City commented on code in PR #38584:
URL: https://github.com/apache/arrow/pull/38584#discussion_r1391907718


##########
python/pyarrow/tests/test_compute.py:
##########
@@ -2572,8 +2573,8 @@ def validate_select_k(select_k_indices, arr, order, 
stable_sort=False):
     for k in [0, 2, 4]:
         for order in ["descending", "ascending"]:
             result = pc.select_k_unstable(
-                arr, k=k, sort_keys=[("dummy", order)])
-            validate_select_k(result, arr, order)
+                arr, k=k, sort_keys=[("dummy", order, "at_end")])

Review Comment:
   ```
       cdef cppclass CSortKey" arrow::compute::SortKey":
           CSortKey(CFieldRef target, CSortOrder order, CNullPlacement 
null_placement)
           CFieldRef target
           CSortOrder order
           CNullPlacement null_placement
   ```
   
   What I mean is that when we add a new fileld(here is null_placement) end to 
sortkey, this tuple is incompatible with the original one, that is, it seems 
that we cannot pass a default value here so that the original tuple can also be 
used.
   
   
   our expected:
   ```
       cdef cppclass CSortKey" arrow::compute::SortKey":
           CSortKey(CFieldRef target, CSortOrder order, CNullPlacement 
null_placement = AtEnd)
           CFieldRef target
           CSortOrder order
           CNullPlacement null_placement
   ```



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