Skip to content

[ES|QL] restore better syntax error messages #124145

@drewdaemon

Description

@drewdaemon

Description

21845ad resulted in some negative changes to our syntax error messages.

The top priority is row var = 1 not in

  • used to result in mismatched input '<EOF>' expecting '('
  • but now says mismatched input '<EOF>' expecting LP
Image

(the lexer lost the literal name for LP, so it just gives the symbolic name... this won't be obvious to a user).

Also, an incorrect command name generates an error with a missing element in the list

from index | project

  • used to result in mismatched input 'PROJECT' expecting {'dissect', 'drop', 'enrich', 'eval', 'grok', 'keep', 'limit', 'mv_expand', 'rename', 'sort', 'stats', 'where', 'lookup'}
  • but now says mismatched input 'PROJECT' expecting {, 'enrich', 'dissect', 'eval', 'grok', 'limit', 'sort', 'stats', 'where', 'lookup', 'mv_expand', 'drop', 'keep', 'rename'}

Could we restore the original behavior in these cases? Particularly, the parentheses.

Metadata

Metadata

Assignees

No one assigned

    Labels

    :Analytics/ES|QLAKA ESQLES|QL-uiImpacts ES|QL UITeam:AnalyticsMeta label for analytical engine team (ESQL/Aggs/Geo)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions