Fix tm_outliers joins for compound keys - #1012
Conversation
|
I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
SummaryClosing this PR because the fix belongs in the Thanks to maintainersThanks for correcting the scope and for opening the upstream tracking issues. Issue or motivation
Root causeWith ChangeI am withdrawing the module-level selector workaround and closing this PR. TestsThe focused ScopeNo branch rewrite or code push was made, and I did not open a duplicate upstream PR. |
Summary
Preserve complete primary keys in the
picks()implementation oftm_outliers()so child datasets with compound keys can populate the outlier table.Thanks to maintainers
Thanks for maintaining the module and for taking the time to review this focused fix.
Issue or motivation
Fixes #1011. With ADLB selected and no categorical variable, the merged analysis kept only
STUDYIDandUSUBJID, while the outlier table joined back onSTUDYID,USUBJID,PARAMCD, andAVISIT.Root cause
teal.picks::merge_srv()retains the child dataset's foreign key unless other variables are selected.srv_outliers.picks()later needs the complete primary key to retrieve additional columns, so the generated join referenced columns absent fromANL.Change
Add an internal selector for the selected outlier dataset's primary key before merging. The regression test uses
rADSLandrADLB, leaves the categorical selection empty, and checks both complete-key retention and stable row counts.Tests
TESTING_DEPTH=4 NOT_CRAN=true R CMD check --as-cran --no-manual: no errors or warnings; one expected development-version NOTE.TESTING_DEPTH=5browser tests:tm_outlierspassed 61 assertions. The full run's twotm_file_viewerfailures were reproduced unchanged on a cleanorigin/mainworktree.tm_outlierstests passed (84 assertions).lintrpassed on the changed R files;stylerreported no changes.Scope
This only changes the
picks()merge inputs and adds regression coverage. It does not change the legacydata_extract_specpath, public arguments, plots, orteal.picksmerge behavior.