We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
trino-gateway/gateway-ha/src/main/java/io/trino/gateway/ha/router/TrinoQueryProperties.java
Line 189 in 7b2bbde
[StatementUtils.getQueryType returns Optional] (https://github.com/trinodb/trino/blob/c751cf5a500af61ff43b3ab0abd6d07b40cd7148/core/trino-main/src/main/java/io/trino/util/StatementUtils.java#L251), so resourceGroupQueryType will be Optional.toString not QueryType.toString, like Optional[...].
Optional[...]
The text was updated successfully, but these errors were encountered:
@willmostly
if getQueryType(statement) returns an empty Optional, as calling toString() on an empty Optional would result in a NoSuchElementException.
getQueryType(statement)
What do you think of having a default string of UKNOWN if the optional is empty?
resourceGroupQueryType = StatementUtils.getQueryType(statement) .map(QueryType::toString) .orElse("UNKNOWN");
Sorry, something went wrong.
No branches or pull requests
trino-gateway/gateway-ha/src/main/java/io/trino/gateway/ha/router/TrinoQueryProperties.java
Line 189 in 7b2bbde
[StatementUtils.getQueryType returns Optional] (https://github.com/trinodb/trino/blob/c751cf5a500af61ff43b3ab0abd6d07b40cd7148/core/trino-main/src/main/java/io/trino/util/StatementUtils.java#L251), so resourceGroupQueryType will be Optional.toString not QueryType.toString, like
Optional[...]
.The text was updated successfully, but these errors were encountered: