forked from elastic/elasticsearch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix union-types where one index is missing the field (elastic#111932)
* Fix union-types where one index is missing the field When none of the indexes has the field, a validation error is correctly thrown, and when all indexes have the field, union-types works as normal. But when some indexes have the field and some do not, we were getting and internal error. We treat this case similarly to when some documents are missing the field, in which case `null` values are produced. So now a multi-index query where some indexes are missing the field will produce nulls for the documents coming from those indexes. * Update docs/changelog/111932.yaml * Added capability for this fix (missing-field)
- Loading branch information
1 parent
9387ce3
commit 5ac4d8c
Showing
7 changed files
with
109 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
pr: 111932 | ||
summary: Fix union-types where one index is missing the field | ||
area: ES|QL | ||
type: bug | ||
issues: | ||
- 111912 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
x-pack/plugin/esql/qa/testFixtures/src/main/resources/mapping-missing_ip_sample_data.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"properties": { | ||
"@timestamp": { | ||
"type": "date" | ||
}, | ||
"event_duration": { | ||
"type": "long" | ||
}, | ||
"message": { | ||
"type": "keyword" | ||
} | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
x-pack/plugin/esql/qa/testFixtures/src/main/resources/missing_ip_sample_data.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
@timestamp:date,event_duration:long,message:keyword | ||
2023-10-23T13:55:01.543Z,1756467,Connected to 10.1.0.1 | ||
2023-10-23T13:53:55.832Z,5033755,Connection error | ||
2023-10-23T13:52:55.015Z,8268153,Connection error | ||
2023-10-23T13:51:54.732Z,725448,Connection error | ||
2023-10-23T13:33:34.937Z,1232382,Disconnected | ||
2023-10-23T12:27:28.948Z,2764889,Connected to 10.1.0.2 | ||
2023-10-23T12:15:03.360Z,3450233,Connected to 10.1.0.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters