Skip to content

Audit field availability for new keywords added with the 3.3 improvements #4280

@Swiddis

Description

@Swiddis

The Situation

This issue came up with #4185, #4113, #4120, and probably others:

In the PPL and SQL grammars, there's a keywordsCanBeId entry:

We've been adding a lot of new keywords to the Lexer, but haven't been adding them all to this entry. This means that you can't use those keywords as fields anymore without escaping. You get an error similar to this:

[field] is not a valid term at this part of the query: '...output=output inner.field' <-- HERE. Expecting tokens: ID

In the above case, the field keyword was added in #4109 and caused test failures for #4185 after merge, because field was used as a generic field name.

The Fix

We should audit the new keywords added as part of the 3.3 rush, and verify that all appropriate new keywords are also available as field names.

We could also consider finding a way to refactor such that we don't need to manually update this allowlist to begin with.

Metadata

Metadata

Assignees

No one assigned

    Labels

    maintenanceImproves code quality, but not the producttestingRelated to improving software testingv3.3.0

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions