Skip to content

capture missing() of arguments once as flags in [ - #7932

Open
ben-schwen wants to merge 1 commit into
brk/a1_testsfrom
brk/a2_missing_flags
Open

ben-schwen wants to merge 1 commit into
brk/a1_testsfrom
brk/a2_missing_flags

Conversation

@ben-schwen

Copy link
Copy Markdown
Member

Towards #852

@codecov

codecov Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.09%. Comparing base (851a3a0) to head (8e8d36b).

Additional details and impacted files
@@              Coverage Diff              @@
##           brk/a1_tests    #7932   +/-   ##
=============================================
  Coverage         99.09%   99.09%           
=============================================
  Files                88       88           
  Lines             17420    17430   +10     
=============================================
+ Hits              17262    17272   +10     
  Misses              158      158           

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

@ben-schwen
ben-schwen force-pushed the brk/a2_missing_flags branch from 353fbce to a8fcf6a Compare October 21, 2026 12:07
@ben-schwen
ben-schwen force-pushed the brk/a2_missing_flags branch 2 times, most recently from cba9c55 to 391abec Compare October 24, 2026 23:13
@github-actions

github-actions Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
  • HEAD=brk/a2_missing_flags much slower for DT[by,verbose=TRUE] improved in #6296

(Plot image upload to picrd.com failed; download the artifact below to view plots)

Generated via commit 8e8d36b

Download link for the artifact containing the test results: ↓ atime-results.zip

Task Duration
R setup and installing dependencies 35 minutes and 18 seconds
Installing different package versions 9 minutes and 8 seconds
Running and plotting the test cases 4 minutes and 8 seconds

Comment thread R/data.table.R
list(.j = substitute(j))
))
if (missing(jsub)) {j = substitute(); jsub=NULL} else if (verbose && !is.null(env)) catf("Argument '%s' after substitute: %s\n", "j", deparse1(jsub, collapse="\n"))
if (missing(jsub)) {j = substitute(); jsub=NULL; missing_j=TRUE} else if (verbose && !is.null(env)) catf("Argument '%s' after substitute: %s\n", "j", deparse1(jsub, collapse="\n"))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how can we have !missing(j) && missing(jsub)? something like [, j = expr, env = alist(j=)]?

missing() works in the calling frame so it blocks moving code out of [.data.table.
Capture it once at the top as missing_<arg> flags and keep them in sync where an argument is reassigned.

No behaviour change.
@ben-schwen
ben-schwen force-pushed the brk/a2_missing_flags branch from 391abec to 8e8d36b Compare October 26, 2026 15:13

This branch has not been deployed

No deployments
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.

2 participants