Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use count_big in aggregate covariates #62

Open
anthonysena opened this issue Nov 5, 2024 · 0 comments · May be fixed by #63
Open

Use count_big in aggregate covariates #62

anthonysena opened this issue Nov 5, 2024 · 0 comments · May be fixed by #63

Comments

@anthonysena
Copy link
Contributor

It has been reported that this query:

message("Extracting target cohort counts")
sql <- "select
cohort_definition_id,
count(*) row_count,
count(distinct subject_id) person_count,
min(datediff(day, cohort_start_date, cohort_end_date)) min_exposure_time,
avg(datediff(day, cohort_start_date, cohort_end_date)) mean_exposure_time,
max(datediff(day, cohort_start_date, cohort_end_date)) max_exposure_time
from
(select * from #agg_cohorts_before union select * from #agg_cohorts_extras) temp
group by cohort_definition_id;"

Is overflowing the int data type. This should use COUNT_BIG instead.

@anthonysena anthonysena linked a pull request Nov 5, 2024 that will close this issue
@anthonysena anthonysena linked a pull request Nov 5, 2024 that will close this issue
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 a pull request may close this issue.

1 participant