Skip to content
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

[8.x] [ES|QL] [Discover] Displays the histogram suggestion always for non transformational commands (#195863) #196074

Merged
merged 1 commit into from
Oct 14, 2024

Conversation

kibanamachine
Copy link
Contributor

Backport

This will backport the following commits from main to 8.x:

Questions ?

Please refer to the Backport tool documentation

…ransformational commands (elastic#195863)

## Summary

Closes elastic#195752

This PR is fixing 2 bugs:

- It filters out counter fields from the breakdown as they are not
supported. I created a new util for this
- Fixes a bug unrelated with the breakdown (it also exists in previous
minors). The LensVis service is computing suggestions and pushes them to
`availableSuggestionsWithType `. In some indexes (it depends on the
types of the first 5 columns of the index) the lens suggestions api
might return a suggestion. So in that case the array has the histogram
suggestion + the suggestion from the suggestions api. So the service
will pick the first one which is not the histogram. But we know that in
case of non transformational commands we want to suggest the histogram.
So this PR is fixing it by ensuring that the array is cleaned up before
pushing the histogram suggestion.

Note: The 2 bugs are unrelated I just decided to fix them in one PR as
they are both histogram bugs.

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

(cherry picked from commit f962cdc)
@kibanamachine kibanamachine merged commit b7c0e07 into elastic:8.x Oct 14, 2024
24 checks passed
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
unifiedHistogram 69.7KB 70.1KB +350.0B
Unknown metric groups

API count

id before after diff
@kbn/esql-utils 77 79 +2

cc @stratoula

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants