You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When waiting for a parser to complete its job in CCJSqlParser.parseStatement(CCJSqlParser) we call Future.get(long, TimeUnit) which clearly expects a long value to be passed, however the project does this:
statement = future.get( parser.getConfiguration().getAsInteger(Feature.timeOut), TimeUnit.MILLISECONDS);
Note the getAsInteger method.
Furthermore when using a custom value for the timeout setting it would be more convenient to just do: CCJSqlParserUtil.parse(sql, parser -> parser.withTimeOut(TimeUnit.SECONDS.toMillis(30)))
instead of current: CCJSqlParserUtil.parse(sql, parser -> parser.withTimeOut(Long.valueOf(TimeUnit.SECONDS.toMillis(30)).intValue()))
The text was updated successfully, but these errors were encountered:
zaza
added a commit
to zaza/JSqlParser
that referenced
this issue
Apr 4, 2023
When waiting for a parser to complete its job in
CCJSqlParser.parseStatement(CCJSqlParser)
we callFuture.get(long, TimeUnit)
which clearly expects a long value to be passed, however the project does this:statement = future.get( parser.getConfiguration().getAsInteger(Feature.timeOut), TimeUnit.MILLISECONDS);
Note the
getAsInteger
method.Furthermore when using a custom value for the timeout setting it would be more convenient to just do:
CCJSqlParserUtil.parse(sql, parser -> parser.withTimeOut(TimeUnit.SECONDS.toMillis(30)))
instead of current:
CCJSqlParserUtil.parse(sql, parser -> parser.withTimeOut(Long.valueOf(TimeUnit.SECONDS.toMillis(30)).intValue()))
The text was updated successfully, but these errors were encountered: