Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/changelog/133737.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pr: 133737
summary: "KQL: Support boolean operators in field queries"
area: Search
type: bug
issues:
- 132366
20 changes: 13 additions & 7 deletions x-pack/plugin/kql/src/main/antlr/KqlBase.g4
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ topLevelQuery

query
: <assoc=right> query operator=(AND|OR) query #booleanQuery
| simpleQuery #defaultQuery
| simpleQuery #defaultQuery
;

simpleQuery
Expand All @@ -51,7 +51,7 @@ nestedQuery

nestedSubQuery
: <assoc=right> nestedSubQuery operator=(AND|OR) nestedSubQuery #booleanNestedQuery
| nestedSimpleSubQuery #defaultNestedQuery
| nestedSimpleSubQuery #defaultNestedQuery
;

nestedSimpleSubQuery
Expand Down Expand Up @@ -89,21 +89,27 @@ existsQuery

fieldQuery
: fieldName COLON fieldQueryValue
| fieldName COLON LEFT_PARENTHESIS fieldQueryValue RIGHT_PARENTHESIS
;

fieldLessQuery
: fieldQueryValue
| LEFT_PARENTHESIS fieldQueryValue RIGHT_PARENTHESIS
;

fieldQueryValue
: (AND|OR|NOT)? (UNQUOTED_LITERAL|WILDCARD)+ (NOT|AND|OR)?
| (AND|OR) (AND|OR|NOT)?
| NOT (AND|OR)?
: (UNQUOTED_LITERAL|WILDCARD)+
| (UNQUOTED_LITERAL|WILDCARD)? (OR|AND|NOT)+
| (AND|OR)+ (UNQUOTED_LITERAL|WILDCARD)?
| QUOTED_STRING
| operator=NOT (fieldQueryValue)?
| LEFT_PARENTHESIS booleanFieldQueryValue RIGHT_PARENTHESIS
;

booleanFieldQueryValue
: booleanFieldQueryValue operator=(AND|OR) fieldQueryValue
| LEFT_PARENTHESIS booleanFieldQueryValue RIGHT_PARENTHESIS
| fieldQueryValue
;

fieldName
: value=UNQUOTED_LITERAL
| value=QUOTED_STRING
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import java.util.Set;
import java.util.function.BiConsumer;
import java.util.function.BiFunction;
import java.util.function.Consumer;

import static org.elasticsearch.common.logging.LoggerMessageFormat.format;
import static org.elasticsearch.xpack.kql.parser.KqlParsingContext.isDateField;
Expand Down Expand Up @@ -207,38 +208,76 @@ public QueryBuilder visitFieldLessQuery(KqlBaseParser.FieldLessQueryContext ctx)

@Override
public QueryBuilder visitFieldQuery(KqlBaseParser.FieldQueryContext ctx) {
return paresFieldQuery(ctx.fieldName(), ctx.fieldQueryValue());
}

BoolQueryBuilder boolQueryBuilder = QueryBuilders.boolQuery().minimumShouldMatch(1);
String queryText = extractText(ctx.fieldQueryValue());
boolean hasWildcard = hasWildcard(ctx.fieldQueryValue());
public QueryBuilder paresBooleanFieldQuery(
KqlBaseParser.FieldNameContext fieldNameCtx,
KqlBaseParser.BooleanFieldQueryValueContext booleanFieldQueryValueCtx
) {
if (booleanFieldQueryValueCtx.operator != null) {
BoolQueryBuilder boolQueryBuilder = QueryBuilders.boolQuery();

Token operator = booleanFieldQueryValueCtx.operator;
Consumer<QueryBuilder> boolClauseConsumer = operator.getType() == KqlBaseParser.AND
? boolQueryBuilder::must
: boolQueryBuilder::should;
boolClauseConsumer.accept(paresBooleanFieldQuery(fieldNameCtx, booleanFieldQueryValueCtx.booleanFieldQueryValue()));
boolClauseConsumer.accept(paresFieldQuery(fieldNameCtx, booleanFieldQueryValueCtx.fieldQueryValue()));

return operator.getType() == KqlBaseParser.AND
? rewriteConjunctionQuery(boolQueryBuilder)
: rewriteDisjunctionQuery(boolQueryBuilder);
} else if (booleanFieldQueryValueCtx.booleanFieldQueryValue() != null) {
return paresBooleanFieldQuery(fieldNameCtx, booleanFieldQueryValueCtx.booleanFieldQueryValue());
} else {
assert booleanFieldQueryValueCtx.fieldQueryValue() != null;
return paresFieldQuery(fieldNameCtx, booleanFieldQueryValueCtx.fieldQueryValue());
}
}

withFields(ctx.fieldName(), (fieldName, mappedFieldType) -> {
QueryBuilder fieldQuery = null;

if (hasWildcard && isKeywordField(mappedFieldType)) {
fieldQuery = QueryBuilders.wildcardQuery(fieldName, queryText).caseInsensitive(kqlParsingContext.caseInsensitive());
} else if (hasWildcard) {
fieldQuery = QueryBuilders.queryStringQuery(escapeLuceneQueryString(queryText, true)).field(fieldName);
} else if (isDateField(mappedFieldType)) {
RangeQueryBuilder rangeFieldQuery = QueryBuilders.rangeQuery(fieldName).gte(queryText).lte(queryText);
if (kqlParsingContext.timeZone() != null) {
rangeFieldQuery.timeZone(kqlParsingContext.timeZone().getId());
public QueryBuilder paresFieldQuery(
KqlBaseParser.FieldNameContext fieldNameCtx,
KqlBaseParser.FieldQueryValueContext fieldQueryValueCtx
) {
if (fieldQueryValueCtx.operator != null) {
assert fieldQueryValueCtx.fieldQueryValue() != null;
return QueryBuilders.boolQuery().mustNot(paresFieldQuery(fieldNameCtx, fieldQueryValueCtx.fieldQueryValue()));
} else if (fieldQueryValueCtx.booleanFieldQueryValue() != null) {
return paresBooleanFieldQuery(fieldNameCtx, fieldQueryValueCtx.booleanFieldQueryValue());
} else {
BoolQueryBuilder boolQueryBuilder = QueryBuilders.boolQuery();
String queryText = extractText(fieldQueryValueCtx);
boolean hasWildcard = hasWildcard(fieldQueryValueCtx);

withFields(fieldNameCtx, (fieldName, mappedFieldType) -> {
QueryBuilder fieldQuery;

if (hasWildcard && isKeywordField(mappedFieldType)) {
fieldQuery = QueryBuilders.wildcardQuery(fieldName, queryText).caseInsensitive(kqlParsingContext.caseInsensitive());
} else if (hasWildcard) {
fieldQuery = QueryBuilders.queryStringQuery(escapeLuceneQueryString(queryText, true)).field(fieldName);
} else if (isDateField(mappedFieldType)) {
RangeQueryBuilder rangeFieldQuery = QueryBuilders.rangeQuery(fieldName).gte(queryText).lte(queryText);
if (kqlParsingContext.timeZone() != null) {
rangeFieldQuery.timeZone(kqlParsingContext.timeZone().getId());
}
fieldQuery = rangeFieldQuery;
} else if (isKeywordField(mappedFieldType)) {
fieldQuery = QueryBuilders.termQuery(fieldName, queryText).caseInsensitive(kqlParsingContext.caseInsensitive());
} else if (fieldQueryValueCtx.QUOTED_STRING() != null) {
fieldQuery = QueryBuilders.matchPhraseQuery(fieldName, queryText);
} else {
fieldQuery = QueryBuilders.matchQuery(fieldName, queryText);
}
fieldQuery = rangeFieldQuery;
} else if (isKeywordField(mappedFieldType)) {
fieldQuery = QueryBuilders.termQuery(fieldName, queryText).caseInsensitive(kqlParsingContext.caseInsensitive());
} else if (ctx.fieldQueryValue().QUOTED_STRING() != null) {
fieldQuery = QueryBuilders.matchPhraseQuery(fieldName, queryText);
} else {
fieldQuery = QueryBuilders.matchQuery(fieldName, queryText);
}

if (fieldQuery != null) {
boolQueryBuilder.should(wrapWithNestedQuery(fieldName, fieldQuery));
}
});
if (fieldQuery != null) {
boolQueryBuilder.should(wrapWithNestedQuery(fieldName, fieldQuery));
}
});

return rewriteDisjunctionQuery(boolQueryBuilder);
return rewriteDisjunctionQuery(boolQueryBuilder);
}
}

private static boolean isAndQuery(ParserRuleContext ctx) {
Expand Down Expand Up @@ -269,9 +308,7 @@ private void withFields(KqlBaseParser.FieldNameContext ctx, BiConsumer<String, M
return;
}

if (ctx.value.getType() == KqlBaseParser.QUOTED_STRING) {
assert fieldNames.size() < 2 : "expecting only one matching field";
}
assert ctx.value.getType() != KqlBaseParser.QUOTED_STRING || fieldNames.size() < 2 : "expecting only one matching field";

fieldNames.forEach(fieldName -> {
MappedFieldType fieldType = kqlParsingContext.fieldType(fieldName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,9 @@ existsQuery
fieldQuery
fieldLessQuery
fieldQueryValue
booleanFieldQueryValue
fieldName


atn:
[4, 1, 16, 166, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 1, 0, 3, 0, 36, 8, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 46, 8, 1, 10, 1, 12, 1, 49, 9, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 3, 2, 59, 8, 2, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 5, 5, 76, 8, 5, 10, 5, 12, 5, 79, 9, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 3, 6, 88, 8, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 3, 8, 96, 8, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 11, 4, 11, 109, 8, 11, 11, 11, 12, 11, 110, 1, 11, 3, 11, 114, 8, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 3, 13, 130, 8, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 3, 14, 137, 8, 14, 1, 15, 3, 15, 140, 8, 15, 1, 15, 4, 15, 143, 8, 15, 11, 15, 12, 15, 144, 1, 15, 3, 15, 148, 8, 15, 1, 15, 1, 15, 3, 15, 152, 8, 15, 1, 15, 1, 15, 3, 15, 156, 8, 15, 1, 15, 3, 15, 159, 8, 15, 1, 16, 1, 16, 1, 16, 3, 16, 164, 8, 16, 1, 16, 0, 2, 2, 10, 17, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 0, 4, 1, 0, 2, 3, 1, 0, 6, 9, 2, 0, 14, 14, 16, 16, 1, 0, 2, 4, 179, 0, 35, 1, 0, 0, 0, 2, 39, 1, 0, 0, 0, 4, 58, 1, 0, 0, 0, 6, 60, 1, 0, 0, 0, 8, 63, 1, 0, 0, 0, 10, 69, 1, 0, 0, 0, 12, 87, 1, 0, 0, 0, 14, 89, 1, 0, 0, 0, 16, 95, 1, 0, 0, 0, 18, 99, 1, 0, 0, 0, 20, 103, 1, 0, 0, 0, 22, 113, 1, 0, 0, 0, 24, 115, 1, 0, 0, 0, 26, 129, 1, 0, 0, 0, 28, 136, 1, 0, 0, 0, 30, 158, 1, 0, 0, 0, 32, 163, 1, 0, 0, 0, 34, 36, 3, 2, 1, 0, 35, 34, 1, 0, 0, 0, 35, 36, 1, 0, 0, 0, 36, 37, 1, 0, 0, 0, 37, 38, 5, 0, 0, 1, 38, 1, 1, 0, 0, 0, 39, 40, 6, 1, -1, 0, 40, 41, 3, 4, 2, 0, 41, 47, 1, 0, 0, 0, 42, 43, 10, 2, 0, 0, 43, 44, 7, 0, 0, 0, 44, 46, 3, 2, 1, 2, 45, 42, 1, 0, 0, 0, 46, 49, 1, 0, 0, 0, 47, 45, 1, 0, 0, 0, 47, 48, 1, 0, 0, 0, 48, 3, 1, 0, 0, 0, 49, 47, 1, 0, 0, 0, 50, 59, 3, 6, 3, 0, 51, 59, 3, 8, 4, 0, 52, 59, 3, 18, 9, 0, 53, 59, 3, 16, 8, 0, 54, 59, 3, 24, 12, 0, 55, 59, 3, 20, 10, 0, 56, 59, 3, 26, 13, 0, 57, 59, 3, 28, 14, 0, 58, 50, 1, 0, 0, 0, 58, 51, 1, 0, 0, 0, 58, 52, 1, 0, 0, 0, 58, 53, 1, 0, 0, 0, 58, 54, 1, 0, 0, 0, 58, 55, 1, 0, 0, 0, 58, 56, 1, 0, 0, 0, 58, 57, 1, 0, 0, 0, 59, 5, 1, 0, 0, 0, 60, 61, 5, 4, 0, 0, 61, 62, 3, 4, 2, 0, 62, 7, 1, 0, 0, 0, 63, 64, 3, 32, 16, 0, 64, 65, 5, 5, 0, 0, 65, 66, 5, 12, 0, 0, 66, 67, 3, 10, 5, 0, 67, 68, 5, 13, 0, 0, 68, 9, 1, 0, 0, 0, 69, 70, 6, 5, -1, 0, 70, 71, 3, 12, 6, 0, 71, 77, 1, 0, 0, 0, 72, 73, 10, 2, 0, 0, 73, 74, 7, 0, 0, 0, 74, 76, 3, 10, 5, 2, 75, 72, 1, 0, 0, 0, 76, 79, 1, 0, 0, 0, 77, 75, 1, 0, 0, 0, 77, 78, 1, 0, 0, 0, 78, 11, 1, 0, 0, 0, 79, 77, 1, 0, 0, 0, 80, 88, 3, 6, 3, 0, 81, 88, 3, 8, 4, 0, 82, 88, 3, 16, 8, 0, 83, 88, 3, 14, 7, 0, 84, 88, 3, 24, 12, 0, 85, 88, 3, 20, 10, 0, 86, 88, 3, 26, 13, 0, 87, 80, 1, 0, 0, 0, 87, 81, 1, 0, 0, 0, 87, 82, 1, 0, 0, 0, 87, 83, 1, 0, 0, 0, 87, 84, 1, 0, 0, 0, 87, 85, 1, 0, 0, 0, 87, 86, 1, 0, 0, 0, 88, 13, 1, 0, 0, 0, 89, 90, 5, 10, 0, 0, 90, 91, 3, 10, 5, 0, 91, 92, 5, 11, 0, 0, 92, 15, 1, 0, 0, 0, 93, 94, 5, 16, 0, 0, 94, 96, 5, 5, 0, 0, 95, 93, 1, 0, 0, 0, 95, 96, 1, 0, 0, 0, 96, 97, 1, 0, 0, 0, 97, 98, 5, 16, 0, 0, 98, 17, 1, 0, 0, 0, 99, 100, 5, 10, 0, 0, 100, 101, 3, 2, 1, 0, 101, 102, 5, 11, 0, 0, 102, 19, 1, 0, 0, 0, 103, 104, 3, 32, 16, 0, 104, 105, 7, 1, 0, 0, 105, 106, 3, 22, 11, 0, 106, 21, 1, 0, 0, 0, 107, 109, 7, 2, 0, 0, 108, 107, 1, 0, 0, 0, 109, 110, 1, 0, 0, 0, 110, 108, 1, 0, 0, 0, 110, 111, 1, 0, 0, 0, 111, 114, 1, 0, 0, 0, 112, 114, 5, 15, 0, 0, 113, 108, 1, 0, 0, 0, 113, 112, 1, 0, 0, 0, 114, 23, 1, 0, 0, 0, 115, 116, 3, 32, 16, 0, 116, 117, 5, 5, 0, 0, 117, 118, 5, 16, 0, 0, 118, 25, 1, 0, 0, 0, 119, 120, 3, 32, 16, 0, 120, 121, 5, 5, 0, 0, 121, 122, 3, 30, 15, 0, 122, 130, 1, 0, 0, 0, 123, 124, 3, 32, 16, 0, 124, 125, 5, 5, 0, 0, 125, 126, 5, 10, 0, 0, 126, 127, 3, 30, 15, 0, 127, 128, 5, 11, 0, 0, 128, 130, 1, 0, 0, 0, 129, 119, 1, 0, 0, 0, 129, 123, 1, 0, 0, 0, 130, 27, 1, 0, 0, 0, 131, 137, 3, 30, 15, 0, 132, 133, 5, 10, 0, 0, 133, 134, 3, 30, 15, 0, 134, 135, 5, 11, 0, 0, 135, 137, 1, 0, 0, 0, 136, 131, 1, 0, 0, 0, 136, 132, 1, 0, 0, 0, 137, 29, 1, 0, 0, 0, 138, 140, 7, 3, 0, 0, 139, 138, 1, 0, 0, 0, 139, 140, 1, 0, 0, 0, 140, 142, 1, 0, 0, 0, 141, 143, 7, 2, 0, 0, 142, 141, 1, 0, 0, 0, 143, 144, 1, 0, 0, 0, 144, 142, 1, 0, 0, 0, 144, 145, 1, 0, 0, 0, 145, 147, 1, 0, 0, 0, 146, 148, 7, 3, 0, 0, 147, 146, 1, 0, 0, 0, 147, 148, 1, 0, 0, 0, 148, 159, 1, 0, 0, 0, 149, 151, 7, 0, 0, 0, 150, 152, 7, 3, 0, 0, 151, 150, 1, 0, 0, 0, 151, 152, 1, 0, 0, 0, 152, 159, 1, 0, 0, 0, 153, 155, 5, 4, 0, 0, 154, 156, 7, 0, 0, 0, 155, 154, 1, 0, 0, 0, 155, 156, 1, 0, 0, 0, 156, 159, 1, 0, 0, 0, 157, 159, 5, 15, 0, 0, 158, 139, 1, 0, 0, 0, 158, 149, 1, 0, 0, 0, 158, 153, 1, 0, 0, 0, 158, 157, 1, 0, 0, 0, 159, 31, 1, 0, 0, 0, 160, 164, 5, 14, 0, 0, 161, 164, 5, 15, 0, 0, 162, 164, 5, 16, 0, 0, 163, 160, 1, 0, 0, 0, 163, 161, 1, 0, 0, 0, 163, 162, 1, 0, 0, 0, 164, 33, 1, 0, 0, 0, 17, 35, 47, 58, 77, 87, 95, 110, 113, 129, 136, 139, 144, 147, 151, 155, 158, 163]
[4, 1, 16, 181, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 1, 0, 3, 0, 38, 8, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 48, 8, 1, 10, 1, 12, 1, 51, 9, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 3, 2, 61, 8, 2, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 5, 5, 78, 8, 5, 10, 5, 12, 5, 81, 9, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 3, 6, 90, 8, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 3, 8, 98, 8, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 11, 4, 11, 111, 8, 11, 11, 11, 12, 11, 112, 1, 11, 3, 11, 116, 8, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 15, 4, 15, 129, 8, 15, 11, 15, 12, 15, 130, 1, 15, 3, 15, 134, 8, 15, 1, 15, 4, 15, 137, 8, 15, 11, 15, 12, 15, 138, 1, 15, 4, 15, 142, 8, 15, 11, 15, 12, 15, 143, 1, 15, 3, 15, 147, 8, 15, 1, 15, 1, 15, 1, 15, 3, 15, 152, 8, 15, 1, 15, 1, 15, 1, 15, 1, 15, 3, 15, 158, 8, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 3, 16, 166, 8, 16, 1, 16, 1, 16, 1, 16, 5, 16, 171, 8, 16, 10, 16, 12, 16, 174, 9, 16, 1, 17, 1, 17, 1, 17, 3, 17, 179, 8, 17, 1, 17, 0, 3, 2, 10, 32, 18, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 0, 4, 1, 0, 2, 3, 1, 0, 6, 9, 2, 0, 14, 14, 16, 16, 1, 0, 2, 4, 196, 0, 37, 1, 0, 0, 0, 2, 41, 1, 0, 0, 0, 4, 60, 1, 0, 0, 0, 6, 62, 1, 0, 0, 0, 8, 65, 1, 0, 0, 0, 10, 71, 1, 0, 0, 0, 12, 89, 1, 0, 0, 0, 14, 91, 1, 0, 0, 0, 16, 97, 1, 0, 0, 0, 18, 101, 1, 0, 0, 0, 20, 105, 1, 0, 0, 0, 22, 115, 1, 0, 0, 0, 24, 117, 1, 0, 0, 0, 26, 121, 1, 0, 0, 0, 28, 125, 1, 0, 0, 0, 30, 157, 1, 0, 0, 0, 32, 165, 1, 0, 0, 0, 34, 178, 1, 0, 0, 0, 36, 38, 3, 2, 1, 0, 37, 36, 1, 0, 0, 0, 37, 38, 1, 0, 0, 0, 38, 39, 1, 0, 0, 0, 39, 40, 5, 0, 0, 1, 40, 1, 1, 0, 0, 0, 41, 42, 6, 1, -1, 0, 42, 43, 3, 4, 2, 0, 43, 49, 1, 0, 0, 0, 44, 45, 10, 2, 0, 0, 45, 46, 7, 0, 0, 0, 46, 48, 3, 2, 1, 2, 47, 44, 1, 0, 0, 0, 48, 51, 1, 0, 0, 0, 49, 47, 1, 0, 0, 0, 49, 50, 1, 0, 0, 0, 50, 3, 1, 0, 0, 0, 51, 49, 1, 0, 0, 0, 52, 61, 3, 6, 3, 0, 53, 61, 3, 8, 4, 0, 54, 61, 3, 18, 9, 0, 55, 61, 3, 16, 8, 0, 56, 61, 3, 24, 12, 0, 57, 61, 3, 20, 10, 0, 58, 61, 3, 26, 13, 0, 59, 61, 3, 28, 14, 0, 60, 52, 1, 0, 0, 0, 60, 53, 1, 0, 0, 0, 60, 54, 1, 0, 0, 0, 60, 55, 1, 0, 0, 0, 60, 56, 1, 0, 0, 0, 60, 57, 1, 0, 0, 0, 60, 58, 1, 0, 0, 0, 60, 59, 1, 0, 0, 0, 61, 5, 1, 0, 0, 0, 62, 63, 5, 4, 0, 0, 63, 64, 3, 4, 2, 0, 64, 7, 1, 0, 0, 0, 65, 66, 3, 34, 17, 0, 66, 67, 5, 5, 0, 0, 67, 68, 5, 12, 0, 0, 68, 69, 3, 10, 5, 0, 69, 70, 5, 13, 0, 0, 70, 9, 1, 0, 0, 0, 71, 72, 6, 5, -1, 0, 72, 73, 3, 12, 6, 0, 73, 79, 1, 0, 0, 0, 74, 75, 10, 2, 0, 0, 75, 76, 7, 0, 0, 0, 76, 78, 3, 10, 5, 2, 77, 74, 1, 0, 0, 0, 78, 81, 1, 0, 0, 0, 79, 77, 1, 0, 0, 0, 79, 80, 1, 0, 0, 0, 80, 11, 1, 0, 0, 0, 81, 79, 1, 0, 0, 0, 82, 90, 3, 6, 3, 0, 83, 90, 3, 8, 4, 0, 84, 90, 3, 16, 8, 0, 85, 90, 3, 14, 7, 0, 86, 90, 3, 24, 12, 0, 87, 90, 3, 20, 10, 0, 88, 90, 3, 26, 13, 0, 89, 82, 1, 0, 0, 0, 89, 83, 1, 0, 0, 0, 89, 84, 1, 0, 0, 0, 89, 85, 1, 0, 0, 0, 89, 86, 1, 0, 0, 0, 89, 87, 1, 0, 0, 0, 89, 88, 1, 0, 0, 0, 90, 13, 1, 0, 0, 0, 91, 92, 5, 10, 0, 0, 92, 93, 3, 10, 5, 0, 93, 94, 5, 11, 0, 0, 94, 15, 1, 0, 0, 0, 95, 96, 5, 16, 0, 0, 96, 98, 5, 5, 0, 0, 97, 95, 1, 0, 0, 0, 97, 98, 1, 0, 0, 0, 98, 99, 1, 0, 0, 0, 99, 100, 5, 16, 0, 0, 100, 17, 1, 0, 0, 0, 101, 102, 5, 10, 0, 0, 102, 103, 3, 2, 1, 0, 103, 104, 5, 11, 0, 0, 104, 19, 1, 0, 0, 0, 105, 106, 3, 34, 17, 0, 106, 107, 7, 1, 0, 0, 107, 108, 3, 22, 11, 0, 108, 21, 1, 0, 0, 0, 109, 111, 7, 2, 0, 0, 110, 109, 1, 0, 0, 0, 111, 112, 1, 0, 0, 0, 112, 110, 1, 0, 0, 0, 112, 113, 1, 0, 0, 0, 113, 116, 1, 0, 0, 0, 114, 116, 5, 15, 0, 0, 115, 110, 1, 0, 0, 0, 115, 114, 1, 0, 0, 0, 116, 23, 1, 0, 0, 0, 117, 118, 3, 34, 17, 0, 118, 119, 5, 5, 0, 0, 119, 120, 5, 16, 0, 0, 120, 25, 1, 0, 0, 0, 121, 122, 3, 34, 17, 0, 122, 123, 5, 5, 0, 0, 123, 124, 3, 30, 15, 0, 124, 27, 1, 0, 0, 0, 125, 126, 3, 30, 15, 0, 126, 29, 1, 0, 0, 0, 127, 129, 7, 2, 0, 0, 128, 127, 1, 0, 0, 0, 129, 130, 1, 0, 0, 0, 130, 128, 1, 0, 0, 0, 130, 131, 1, 0, 0, 0, 131, 158, 1, 0, 0, 0, 132, 134, 7, 2, 0, 0, 133, 132, 1, 0, 0, 0, 133, 134, 1, 0, 0, 0, 134, 136, 1, 0, 0, 0, 135, 137, 7, 3, 0, 0, 136, 135, 1, 0, 0, 0, 137, 138, 1, 0, 0, 0, 138, 136, 1, 0, 0, 0, 138, 139, 1, 0, 0, 0, 139, 158, 1, 0, 0, 0, 140, 142, 7, 0, 0, 0, 141, 140, 1, 0, 0, 0, 142, 143, 1, 0, 0, 0, 143, 141, 1, 0, 0, 0, 143, 144, 1, 0, 0, 0, 144, 146, 1, 0, 0, 0, 145, 147, 7, 2, 0, 0, 146, 145, 1, 0, 0, 0, 146, 147, 1, 0, 0, 0, 147, 158, 1, 0, 0, 0, 148, 158, 5, 15, 0, 0, 149, 151, 5, 4, 0, 0, 150, 152, 3, 30, 15, 0, 151, 150, 1, 0, 0, 0, 151, 152, 1, 0, 0, 0, 152, 158, 1, 0, 0, 0, 153, 154, 5, 10, 0, 0, 154, 155, 3, 32, 16, 0, 155, 156, 5, 11, 0, 0, 156, 158, 1, 0, 0, 0, 157, 128, 1, 0, 0, 0, 157, 133, 1, 0, 0, 0, 157, 141, 1, 0, 0, 0, 157, 148, 1, 0, 0, 0, 157, 149, 1, 0, 0, 0, 157, 153, 1, 0, 0, 0, 158, 31, 1, 0, 0, 0, 159, 160, 6, 16, -1, 0, 160, 161, 5, 10, 0, 0, 161, 162, 3, 32, 16, 0, 162, 163, 5, 11, 0, 0, 163, 166, 1, 0, 0, 0, 164, 166, 3, 30, 15, 0, 165, 159, 1, 0, 0, 0, 165, 164, 1, 0, 0, 0, 166, 172, 1, 0, 0, 0, 167, 168, 10, 3, 0, 0, 168, 169, 7, 0, 0, 0, 169, 171, 3, 30, 15, 0, 170, 167, 1, 0, 0, 0, 171, 174, 1, 0, 0, 0, 172, 170, 1, 0, 0, 0, 172, 173, 1, 0, 0, 0, 173, 33, 1, 0, 0, 0, 174, 172, 1, 0, 0, 0, 175, 179, 5, 14, 0, 0, 176, 179, 5, 15, 0, 0, 177, 179, 5, 16, 0, 0, 178, 175, 1, 0, 0, 0, 178, 176, 1, 0, 0, 0, 178, 177, 1, 0, 0, 0, 179, 35, 1, 0, 0, 0, 18, 37, 49, 60, 79, 89, 97, 112, 115, 130, 133, 138, 143, 146, 151, 157, 165, 172, 178]
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,18 @@ class KqlBaseBaseListener implements KqlBaseListener {
* <p>The default implementation does nothing.</p>
*/
@Override public void exitFieldQueryValue(KqlBaseParser.FieldQueryValueContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterBooleanFieldQueryValue(KqlBaseParser.BooleanFieldQueryValueContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitBooleanFieldQueryValue(KqlBaseParser.BooleanFieldQueryValueContext ctx) { }
/**
* {@inheritDoc}
*
Expand Down
Loading