Tplyr 1.3.3: fix all-missing (NA) count target sort warning (#213)#214
Open
mstackhouse wants to merge 3 commits into
Open
Tplyr 1.3.3: fix all-missing (NA) count target sort warning (#213)#214mstackhouse wants to merge 3 commits into
mstackhouse wants to merge 3 commits into
Conversation
A group_count() layer whose target is entirely NA hit max() on an empty factor-level table in the byfactor sort path, emitting "no non-missing arguments to max; returning -Inf" and producing an -Inf ord_layer sort value. Guard the three max()-of-empty-set sites in R/sort.R and add a regression test (#213). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Update cran-comments for the 1.3.3 patch submission (#213). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #214 +/- ##
=======================================
Coverage 95.68% 95.68%
=======================================
Files 46 46
Lines 3685 3688 +3
=======================================
+ Hits 3526 3529 +3
Misses 159 159 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Note the patch is an update from CRAN 1.3.2, record the GitHub Actions test matrix that ran, and document the absence of strong reverse dependencies. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Patch release 1.3.3. Fixes #213.
A
group_count()layer whose target variable is entirely missing (NA) triggered:and produced an invalid
-Infsort value, because the defaultbyfactorsort path calledmax()on an empty factor-level table (sort()drops the all-NAlevel). This guards the threemax()-of-empty-set sites inR/sort.R.Displayed counts were always correct; only the (hidden)
ord_layer_*sort values and the spurious warning were affected.Changes
R/sort.R— guard empty-setmax()inget_data_order_byvarn()and the twoset_missing_countbranches ofget_data_order_count()tests/testthat/test-sort.R— regression test (group_count() with an all-missing (NA) target warns "no non-missing arguments to max" and yields -Inf sort value #213): all-NA target builds with no warning, finite ordering, intact counts;set_missing_count()path also cleanNEWS.md— 1.3.3 entryDESCRIPTION— 1.3.2 → 1.3.3cran-comments.md— 1.3.3 submission notesValidation
R CMD check: 0 errors | 0 warnings | 1 note (the benign "unable to verify current time" timestamp note)Closes #213