-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Fix FORK with union-types #134033
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
Fix FORK with union-types #134033
Changes from 10 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
39dedf2
WIP Using only 'synthetic' in union types removal to fix fork bug
craigtaverner c9bf571
Update docs/changelog/134033.yaml
craigtaverner 3e81a63
Add missing ESQLCapability
craigtaverner d65bef5
Adds required capability to test that uses fork
ncordon 9e75a9c
Merge branch 'main' into fix_fork_union_types
ncordon 21ac430
Tries to exclude NO_FIELDS from the union type cleaning
ncordon aeadedf
Finds better way of filtering out NO_FIELDS
ncordon ff371e8
Merge branch 'main' into fix_fork_union_types
craigtaverner a4cbd00
Merge branch 'main' into fix_fork_union_types
ncordon 75c37d0
Merge branch 'main' into fix_fork_union_types
craigtaverner 3589c50
Adds EVAL to check variable can still be used after the FORK
ncordon 510c2a8
Merge branch 'main' into fix_fork_union_types
ncordon 502bbc3
This should be working now
ncordon 70d3a1f
Un-ignores INLINESTATS tests that should be working
ncordon 70d2bb8
Re-ignores tests
ncordon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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: 134033 | ||
summary: Fix FORK with union-types | ||
area: ES|QL | ||
type: bug | ||
issues: | ||
- 133973 |
This file contains hidden or 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 |
---|---|---|
|
@@ -1397,6 +1397,23 @@ event_duration:long | _index:keyword | ts:date | ts_str: | |
8268153 | sample_data_ts_nanos | 2023-10-23T13:52:55.015Z | 2023-10-23T13:52:55.015123456Z | 1698069175015123456 | 172.21.3.15 | 172.21.3.15 | ||
; | ||
|
||
multiIndexInlinestatsOfMultiTypedField | ||
required_capability: inlinestats_v11 | ||
required_capability: fork_union_types | ||
// https://github.com/elastic/elasticsearch/issues/133973 | ||
FROM apps, apps_short | ||
| INLINESTATS s = sum(id::integer) | ||
| SORT name, version | ||
| LIMIT 5 | ||
; | ||
|
||
id:unsupported | name:keyword | version:version | s:long | ||
null | aaaaa | 1 | 210 | ||
null | aaaaa | 1 | 210 | ||
null | aaaaa | 1.2.3.4 | 210 | ||
null | aaaaa | 1.2.3.4 | 210 | ||
null | bbbbb | 2.1 | 210 | ||
; | ||
|
||
inlineStatsUnionGroup-Ignore | ||
required_capability: union_types | ||
|
@@ -1720,6 +1737,34 @@ id:integer | name:keyword | count:long | |
14 | mmmmm | 2 | ||
; | ||
|
||
shortIntegerWideningFork | ||
required_capability: union_types | ||
required_capability: fork_union_types | ||
required_capability: casting_operator | ||
required_capability: union_types_numeric_widening | ||
required_capability: fork_v9 | ||
|
||
FROM apps, apps_short | ||
| EVAL x = id::integer | ||
| FORK (WHERE true) (WHERE true) | ||
| DROP _fork | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can we do something with |
||
| SORT x ASC, name ASC, version ASC | ||
| LIMIT 10 | ||
; | ||
|
||
id:unsupported | name:keyword | version:version | x:integer | ||
null | aaaaa | 1 | 1 | ||
null | aaaaa | 1 | 1 | ||
null | aaaaa | 1 | 1 | ||
null | aaaaa | 1 | 1 | ||
null | bbbbb | 2.1 | 2 | ||
null | bbbbb | 2.1 | 2 | ||
null | bbbbb | 2.1 | 2 | ||
null | bbbbb | 2.1 | 2 | ||
null | ccccc | 2.3.4 | 3 | ||
null | ccccc | 2.3.4 | 3 | ||
; | ||
|
||
ImplicitCastingMultiTypedFieldsKeepSort | ||
required_capability: date_nanos_type | ||
required_capability: implicit_casting_date_and_date_nanos | ||
|
This file contains hidden or 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 hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might want to look at inlinestats.csv-spec file and search for
https://github.com/elastic/elasticsearch/issues/133973
. There are some ignored tests in there that need a check.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We checked these tests cannot be unignored because there seems to be a bug with
INLINESTATS
in queries where we use a union type, which seems unrelated to what we've done forFORK
:To be investigated as a separate piece of work