-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Lens] Allow date functions in formula #143632
Conversation
Pinging @elastic/kibana-vis-editors @elastic/kibana-vis-editors-external (Team:VisEditors) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review in progress, will update...
Lonely timestamp
When using a simple last_value(timestamp)
the chart result is 0, I guess it's still a string as the casting didn't kick in yet:
When adding any math operation to it will trigger the casting:
Date ranges error
Fields of type date_range
should be excluded:
Good catch @dej611 , I think it's because there is no inner |
Should be fixed |
Forgot to push? |
Yes, sorry |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checked latest version and could not find any new issue! 🎉
@@ -327,7 +327,7 @@ describe('last_value', () => { | |||
).toEqual({ | |||
dataType: 'ip', | |||
isBucketed: false, | |||
scale: 'ratio', | |||
scale: 'ordinal', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is basically fixing a bug
💚 Build Succeeded
Metrics [docs]Public APIs missing comments
Any counts in public APIs
Async chunks
Page load bundle
Unknown metric groupsAPI count
ESLint disabled in files
ESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
src/plugins/expressions/common/expression_functions/specs/math_column.ts
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM👍
hello @flash1293 , thanks for this PR ! If I understand correctly, in 8.6.0 I will be able to calculate the delta between 2 dates, for example |
@probance-antoine the As for the |
Fixes #112851
mathColumn
expression function to cast values that are not numbers.