Skip to content

Commit

Permalink
attempt to patch count(*) overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
msuchard committed Nov 5, 2024
1 parent 67613dc commit 7e14387
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion R/AggregateCovariates.R
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ computeTargetAggregateCovariateAnalyses <- function(
message("Extracting target cohort counts")
sql <- "select
cohort_definition_id,
count(*) row_count,
count_big(*) 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,
Expand Down
2 changes: 1 addition & 1 deletion inst/settings/resultsDataModelSpecification.csv
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ cohort_counts,start_anchor,varchar(15),No,No,No,No,The start anchor
cohort_counts,end_anchor,varchar(15),No,No,No,No,The end anchor
cohort_counts,min_prior_observation,int,No,No,No,No,Minimum time observed before index
cohort_counts,outcome_washout_days,int,No,No,No,No,Patients with outcome during washout are excluded
cohort_counts,row_count,int,Yes,No,No,No,The number of rows in each cohort
cohort_counts,row_count,bigint,Yes,No,No,No,The number of rows in each cohort
cohort_counts,person_count,int,Yes,No,No,No,The number of distinct people in each cohort
cohort_counts,min_exposure_time,bigint,No,No,No,No,Minimum exposure time across cohort
cohort_counts,mean_exposure_time,bigint,No,No,No,No,Mean exposure time across cohort
Expand Down
2 changes: 1 addition & 1 deletion inst/sql/sql_server/ResultTables.sql
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ CREATE TABLE @my_schema.@table_prefixcohort_counts(
end_anchor varchar(15),
min_prior_observation int,
outcome_washout_days int,
row_count int NOT NULL,
row_count bigint NOT NULL,
person_count int NOT NULL,
min_exposure_time int,
mean_exposure_time int,
Expand Down

0 comments on commit 7e14387

Please sign in to comment.