-
Notifications
You must be signed in to change notification settings - Fork 4k
Open
Description
Describe the enhancement requested
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.
Line 116 in 80e3986
| if (prop < 1) { |
The TODO was introduced in commit 80e3986 when implementing slice_sample():
arrow/r/tests/testthat/test-dplyr-slice.R
Line 192 in 80e3986
| # TODO: handle edge case where prop = 1, do nothing? |
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.
Component(s)
R