Skip to content

Commit

Permalink
Fix bug in right join for negate subset operator (#168)
Browse files Browse the repository at this point in the history
* Fix bug in right join for negate subset operator

* Add subset logic checks

* Fix R CMD checks
  • Loading branch information
anthonysena authored Jun 20, 2024
1 parent b088443 commit 2f30ef8
Show file tree
Hide file tree
Showing 2 changed files with 446 additions and 1 deletion.
3 changes: 2 additions & 1 deletion inst/sql/sql_server/subsets/CohortSubsetOperator.sql
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ FROM (
HAVING COUNT (DISTINCT S.COHORT_DEFINITION_ID) >= @subset_length
) A
{@negate == '1'}?{
RIGHT JOIN @target_table B ON B.subject_id = A.subject_id
RIGHT JOIN @target_table B ON B.subject_id = A.subject_id
AND b.cohort_start_date = a.cohort_start_date
WHERE A.subject_id IS NULL
}
Loading

0 comments on commit 2f30ef8

Please sign in to comment.