## Summary
Based on https://github.com/elastic/elasticsearch/pull/108421
Closes https://github.com/elastic/kibana/issues/180805
It allows the users to add an `?earliest` and `?latest` variable in the
ES|QL editor.
When we are detecting this variable, we are also sending the values to
ES.
- Earliest is the from value of the date picker
- Latest is the to value of the date picker

Usage in bucket

This enables 2 very important features:
- I can use the values of the time picker in the bucket function
- I can use the time picker for indices without `@timestamp` field
### For reviewers
- Although it seems as a big PR, the majority of the changes happen due
to the signature change of the `getESQLAdHocDataview`
- The ML changes are mostly because the ML code has a lot of repetition.
I think the code needs to be refactored to have a central point
(preferably the `getESQLResults` from the esql-utils. I will create an
issue for the ML team.
- I am not proposing this in bucket autocomplete because it doesnt work
great in general for the date histogram case. We are working on
autocomplete improvements so I am expecting this to be part of a follow
up PR.
- I want to talk to the docs team to add it in the docs.
### Follow ups
- Change the histogram to use the bucket instead of the date_trunc
(needs investigation first)
- Speak with the docs team about adding an example on our official docs
### Flaky test runner
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/6521
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Julia Rechkunova <julia.rechkunova@gmail.com>