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
before attempting to call token.getText, whereas now we call token.getText() before checking the token type (in ParserUtils.nameOrPosition()`). That might be why we see this now and didn't run into this before.
The text was updated successfully, but these errors were encountered:
I couldn't reproduce this on main, the offset of the EsqlBaseParser.metadata on main is different from the one in the original stacktrace, the others from EsqlBaseParser are the same. I'll keep an eye to see if it reoccurs.
org.elasticsearch.xpack.esql.parser.ParserUtils::nameOrPosition::150
org.elasticsearch.xpack.esql.parser.EsqlParser$ParametrizedTokenSource::nextToken::233
org.antlr.v4.runtime.BufferedTokenStream::fetch::169
org.antlr.v4.runtime.BufferedTokenStream::sync::152
org.antlr.v4.runtime.BufferedTokenStream::nextTokenOnChannel::325
org.antlr.v4.runtime.CommonTokenStream::adjustSeekIndex::70
org.antlr.v4.runtime.BufferedTokenStream::consume::137
org.antlr.v4.runtime.Parser::consume::571
org.antlr.v4.runtime.Parser::match::205
org.elasticsearch.xpack.esql.parser.EsqlBaseParser::metadata::1486 ==> different from 1412
org.elasticsearch.xpack.esql.parser.EsqlBaseParser::indexPatternAndMetadataFields::1173
org.elasticsearch.xpack.esql.parser.EsqlBaseParser::fromCommand::1042
org.elasticsearch.xpack.esql.parser.EsqlBaseParser::sourceCommand::434
org.elasticsearch.xpack.esql.parser.EsqlBaseParser::query::339
We got the following stack trace from Serverless:
Somehow, calling
token.getText()
causes an out of bounds when parsing, I think,FROM ... METADATA ...
.The out of bounds is triggered inside code that was most recently changed in #122459, although I can't say if the latter PR caused this.
I didn't manage to repro this after trying for the better part of an hour.
@fang-xing-esql , I noticed that before #122459,
EsqlParser.nextToken()
used to check forbefore attempting to call
token.getText
, whereas now we calltoken.getText()
before checking the token type (in ParserUtils.nameOrPosition()`). That might be why we see this now and didn't run into this before.The text was updated successfully, but these errors were encountered: