Skip to content

EQL: Remove support for = for comparisons (#62756) #62775

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 22, 2020
Merged
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public void testEqualsInFilterConditionSearch() throws Exception {
EqlClient eql = highLevelClient().eql();

EqlSearchRequest request = new EqlSearchRequest("index",
"process where event_type_full = \"process_event\" and serial_event_id in (1,3,5)");
"process where event_type_full == \"process_event\" and serial_event_id in (1,3,5)");

EqlSearchResponse response = execute(request, eql::search, eql::searchAsync);
assertResponse(response, 3);
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/eql/eql-search-api.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ event.
GET /my-index-000001/_eql/search
{
"query": """
process where process.name = "regsvr32.exe"
process where process.name == "regsvr32.exe"
"""
}
----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public void testEqlRestUsage() throws IOException {
int randomSequenceExecutions = randomIntBetween(1, 15);
allTotalQueries += randomSequenceExecutions;
for (int i = 0; i < randomSequenceExecutions; i++) {
runEql("sequence [process where serial_event_id = 1] [process where serial_event_id = 2]");
runEql("sequence [process where serial_event_id == 1] [process where serial_event_id == 2]");
}
responseAsMap = getStats();
metricsToCheck = unmodifiableSet(new HashSet<>(Arrays.asList("sequence", "sequence_queries_two", "pipe_head")));
Expand Down Expand Up @@ -182,7 +182,7 @@ public void testEqlRestUsage() throws IOException {
" [process where opcode == 1] by user" +
" [process where opcode == 2] by user" +
" [file where parent_process_name == \\\"file_delete_event\\\"] by exit_code" +
" until [process where opcode=1] by ppid" +
" until [process where opcode==1] by ppid" +
" | head 4" +
" | tail 2");
}
Expand Down Expand Up @@ -277,8 +277,8 @@ public void testEqlRestUsage() throws IOException {
runEql(
randomFrom(
"process where missing_field < 4 | tail 2",
"sequence abc [process where serial_event_id = 1]",
"sequence with maxspan=1x [process where serial_event_id = 1]",
"sequence abc [process where serial_event_id == 1]",
"sequence with maxspan=1x [process where serial_event_id == 1]",
"sequence by exit_code, user [process where serial_event_id < 4] by ppid",
"sequence by"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ expected_event_ids = [5]

[[queries]]
name = "concatEquals2"
query = 'process where concat(serial_event_id) = "1"'
query = 'process where concat(serial_event_id) == "1"'
expected_event_ids = [1]

[[queries]]
Expand Down Expand Up @@ -98,7 +98,7 @@ expected_event_ids = [1, 2, 3, 4]

[[queries]]
name = "numberStringConversion1"
query = 'process where string(serial_event_id) = "1"'
query = 'process where string(serial_event_id) == "1"'
expected_event_ids = [1]


Expand Down Expand Up @@ -223,16 +223,16 @@ query = "process where serial_event_id + ((1 + 3) * 2 / (3 - 1)) * 2 == 54 or 70
name = "twoSequencesAdditional1"
query = '''
sequence
[process where serial_event_id = 1]
[process where serial_event_id = 2]
[process where serial_event_id == 1]
[process where serial_event_id == 2]
'''
expected_event_ids = [1, 2]

[[queries]]
name = "twoSequencesAdditional2"
query = '''
sequence
[process where serial_event_id=1] by unique_pid
[process where serial_event_id==1] by unique_pid
[process where true] by unique_ppid'''
expected_event_ids = [1, 2]

Expand Down
Loading