Skip to content

Tplyr 1.3.3: fix all-missing (NA) count target sort warning (#213)#214

Open
mstackhouse wants to merge 3 commits into
mainfrom
devel
Open

Tplyr 1.3.3: fix all-missing (NA) count target sort warning (#213)#214
mstackhouse wants to merge 3 commits into
mainfrom
devel

Conversation

@mstackhouse

Copy link
Copy Markdown
Member

Summary

Patch release 1.3.3. Fixes #213.

A group_count() layer whose target variable is entirely missing (NA) triggered:

Warning: no non-missing arguments to max; returning -Inf

and produced an invalid -Inf sort value, because the default byfactor sort path called max() on an empty factor-level table (sort() drops the all-NA level). This guards the three max()-of-empty-set sites in R/sort.R.

Displayed counts were always correct; only the (hidden) ord_layer_* sort values and the spurious warning were affected.

Changes

Validation

  • Differential test (clean baseline vs. fix) across 32 CDISC-style scenarios: 6 fixed, 26 byte-identical, 0 displayed-value changes, no new non-finite sort values
  • Full suite: 954 pass / 0 fail / 0 warn
  • R CMD check: 0 errors | 0 warnings | 1 note (the benign "unable to verify current time" timestamp note)

Closes #213

mstackhouse and others added 2 commits June 29, 2026 09:37
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

codecov Bot commented Jun 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.68%. Comparing base (39684e7) to head (4b6f306).
⚠️ Report is 5 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

group_count() with an all-missing (NA) target warns "no non-missing arguments to max" and yields -Inf sort value

1 participant