[ES|QL] treat time_duration and date_period separately#230276
[ES|QL] treat time_duration and date_period separately#230276drewdaemon merged 50 commits intoelastic:mainfrom
time_duration and date_period separately#230276Conversation
| evalExpectErrors(`from a_index | eval col0 = dateField - 1 ${unit.toUpperCase()}`, []); | ||
| evalExpectErrors(`from a_index | eval col0 = dateField - 1 ${capitalize(unit)}`, []); | ||
| evalExpectErrors(`from a_index | eval col0 = dateField + 1 ${unit}`, []); | ||
| evalExpectErrors(`from a_index | eval 1 ${unit} + 1 year`, []); |
There was a problem hiding this comment.
This is cool... with the old logic, we were incorrectly allowing this case. But now that we've tightened up the typing, the validator correctly flagged it based on the + function definition
| }); | ||
| }); | ||
|
|
||
| describe('time interval', () => { |
There was a problem hiding this comment.
No longer a special case!
|
Pinging @elastic/kibana-esql (Team:ESQL) |
stratoula
left a comment
There was a problem hiding this comment.
LGTM, code review only!
|
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]Public APIs missing comments
Async chunks
Public APIs missing exports
Page load bundle
History
|
…30276) ## Summary Closes elastic#223037 The main change here is changing the "timeInterval" AST item to be two types of new literal items that share mostly the same structure as the other literals and no longer require special handling during validation! A few validation checks around these were also removed. More about that in the comments. ### 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: Elastic Machine <elasticmachine@users.noreply.github.com>
…30276) ## Summary Closes elastic#223037 The main change here is changing the "timeInterval" AST item to be two types of new literal items that share mostly the same structure as the other literals and no longer require special handling during validation! A few validation checks around these were also removed. More about that in the comments. ### 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: Elastic Machine <elasticmachine@users.noreply.github.com>
Summary
Closes #223037
The main change here is changing the "timeInterval" AST item to be two types of new literal items that share mostly the same structure as the other literals and no longer require special handling during validation!
A few validation checks around these were also removed. More about that in the comments.
Checklist