Skip to content

Commit dc76db9

Browse files
authored
limits for big query were changed to 10000 (#2273)
Fixes #2270.
1 parent 456c178 commit dc76db9

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

src/main/java/org/ohdsi/webapi/util/PreparedSqlRender.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
import java.util.function.Function;
88
import java.util.regex.Matcher;
99
import java.util.regex.Pattern;
10+
11+
import com.odysseusinc.arachne.commons.types.DBMSType;
1012
import org.apache.commons.lang3.StringUtils;
1113
import org.ohdsi.webapi.source.Source;
1214

@@ -77,11 +79,13 @@ private static void addToList(List<Object> result, Object value) {
7779
public static int getParameterLimit(Source source) {
7880
int returnVal = 30000;
7981
String sourceDialect = source.getSourceDialect().toLowerCase();
80-
81-
if (sourceDialect.equals("oracle")) {
82+
83+
if (sourceDialect.equals(DBMSType.ORACLE.getOhdsiDB())) {
8284
returnVal = 990;
83-
} else if (sourceDialect.equals("sql server") || sourceDialect.equals("pdw")) {
85+
} else if (sourceDialect.equals(DBMSType.MS_SQL_SERVER.getOhdsiDB()) || sourceDialect.equals(DBMSType.PDW.getOhdsiDB())) {
8486
returnVal = 2000;
87+
} else if (sourceDialect.equals(DBMSType.BIGQUERY.getOhdsiDB())) {
88+
returnVal = 10000;
8589
}
8690
return returnVal;
8791
}

0 commit comments

Comments
 (0)