HyukjinKwon opened a new pull request, #48659:
URL: https://github.com/apache/arrow/pull/48659

   ### Rationale for this change
   
   The TODO comment in `test-dplyr-slice.R` asked whether the edge case where 
`prop = 1` should be explicitly handled. The current implementation already 
correctly handles this case: when `prop = 1`, the `if (prop < 1)`
   condition is false, so no filtering occurs and all data is returned.
   
   
https://github.com/apache/arrow/blob/80e398623d956304acaeb3922e367d45ed96ddec/r/R/dplyr-slice.R#L116
   
   The TODO was introduced in commit 80e398623d when implementing 
`slice_sample()`:
   
   
https://github.com/apache/arrow/blob/80e398623d956304acaeb3922e367d45ed96ddec/r/tests/testthat/test-dplyr-slice.R#L192
   
   This commit added both the `if (prop < 1)` behavior and the TODO comment, 
questioning whether the implicit behavior (doing nothing when prop = 1) was 
correct.
   
   ### What changes are included in this PR?
   
   This PR adds a test for edge case of prop=1, and removed the todo comment.
   
   ### Are these changes tested?
   
   Yes, added unittest.
   
   ### Are there any user-facing changes?
   
   No, test-only.
   


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