Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 14 additions & 9 deletions fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java
Original file line number Diff line number Diff line change
Expand Up @@ -4841,17 +4841,22 @@ public boolean isDropTableIfCtasFailed() {
return dropTableIfCtasFailed;
}

public void checkQueryTimeoutValid(String newQueryTimeout) {
int value = Integer.valueOf(newQueryTimeout);
if (value <= 0) {
UnsupportedOperationException exception =
new UnsupportedOperationException(
"query_timeout can not be set to " + newQueryTimeout + ", it must be greater than 0");
LOG.warn("Check query_timeout failed", exception);
throw exception;
}
public void checkQueryTimeoutValid(String newQueryTimeout) throws AnalysisException {
int value;
try {
value = Integer.parseInt(newQueryTimeout);
} catch (NumberFormatException e) {
throw new AnalysisException(
"query_timeout must be a positive integer, but got: " + newQueryTimeout);
}

if (value <= 0) {
throw new AnalysisException(
"query_timeout must be greater than 0, but got: " + newQueryTimeout);
}
}


public void checkMaxExecutionTimeMSValid(String newValue) {
int value = Integer.valueOf(newValue);
if (value < 1000) {
Expand Down