Add a unit test to verify that an identifier surrounded with backquotes is not a valid syntax for eventType value, as eventType is schemantically a string literal and not a field identifier. Follows: #63169 (cherry picked from commit ff12c1340b3890ac52251f31259fa9a719d9eacc)
This commit is contained in:
parent
1047d67199
commit
19650e860a
|
@ -263,6 +263,12 @@ public class ExpressionTests extends ESTestCase {
|
|||
assertEquals("line 1:19: token recognition error at: '` == true'", e.getMessage());
|
||||
}
|
||||
|
||||
public void testIdentifierForEventTypeDisallowed() {
|
||||
ParsingException e = expectThrows(ParsingException.class, "Expected syntax error",
|
||||
() -> parser.createStatement("`identifier` where foo == true"));
|
||||
assertEquals("line 1:1: no viable alternative at input '`identifier`'", e.getMessage());
|
||||
}
|
||||
|
||||
public void testFunctions() {
|
||||
List<Expression> arguments = Arrays.asList(
|
||||
new UnresolvedAttribute(null, "some.field"),
|
||||
|
|
Loading…
Reference in New Issue