Skip to content

[8.14] [ES|QL] accept string constants for date args (#182856)#182953

Merged
kibanamachine merged 2 commits intoelastic:8.14from
kibanamachine:backport/8.14/pr-182856
May 8, 2024
Merged

[8.14] [ES|QL] accept string constants for date args (#182856)#182953
kibanamachine merged 2 commits intoelastic:8.14from
kibanamachine:backport/8.14/pr-182856

Conversation

@kibanamachine
Copy link
Copy Markdown
Contributor

Backport

This will backport the following commits from main to 8.14:

Questions ?

Please refer to the Backport tool documentation

## Summary

## String constants in place of dates

As of elastic/elasticsearch#106932 string
constants can always be used in place of dates.

- `| eval date_extract("DAY_OF_WEEK", "2024-05-07T13:20:40.554Z")`
- `| STATS AVG(salary) BY bucket = BUCKET(hire_date, 20,
"1985-01-01T00:00:00Z", "1986-01-01T00:00:00Z")
| SORT bucket`
- `| eval date_diff("day", "2021-01-01", "2022-01-01")`

### 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

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 9ddc3c6)
@kibanamachine kibanamachine added the backport This PR is a backport of another PR label May 8, 2024
@kibanamachine kibanamachine enabled auto-merge (squash) May 8, 2024 14:11
@drewdaemon
Copy link
Copy Markdown
Contributor

@elasticmachine merge upstream

@kibana-ci
Copy link
Copy Markdown

💚 Build Succeeded

Metrics [docs]

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
kbnUiSharedDeps-srcJs 3.2MB 3.2MB -605.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @drewdaemon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants