Skip to content

Backporting two union-types fixes to 8.15 (from 111932 and 112610)#112821

Merged
craigtaverner merged 2 commits intoelastic:8.15from
craigtaverner:8.15_backport_union_types_fixes
Sep 13, 2024
Merged

Backporting two union-types fixes to 8.15 (from 111932 and 112610)#112821
craigtaverner merged 2 commits intoelastic:8.15from
craigtaverner:8.15_backport_union_types_fixes

Conversation

@craigtaverner
Copy link
Copy Markdown
Contributor

Two bug-fixes for union-types were not auto-backported to 8.15, so this is a manual backport.

* 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)
* Support widening of numeric types in union-types

Only two lines of this PR are the actual fix.
All the rest is updating the CSV-spec testing infrastructure to make it easier to test this, and adding the tests.
The refactoring involve some cleanup and simplifications also.
This update allows us to add alternative mappings of existing data files without copying the files and changing the header line.
Some of the existing union-types test files were deleted as a result, which is a step in the right direction.

* Update docs/changelog/112610.yaml

* Link capability to PR
@craigtaverner craigtaverner added backport Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) :Analytics/ES|QL AKA ESQL v8.15.2 labels Sep 12, 2024
@craigtaverner craigtaverner requested a review from a team as a code owner September 12, 2024 14:27
Copy link
Copy Markdown
Contributor

@alex-spies alex-spies left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@alex-spies
Copy link
Copy Markdown
Contributor

CI actually ran green, it just doesn't show it on GitHub for whatever reason.

@craigtaverner craigtaverner merged commit 84b4c59 into elastic:8.15 Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Analytics/ES|QL AKA ESQL backport Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) v8.15.2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants