Conversation
There was a problem hiding this comment.
Code LGTM! Tested a little bit and found it was working in a way that's consistent with ES defaults. You could leave a note about the insert_zeroes behavior which ES supports, since it's not supported here, but it's what I expected.
Edit: What about changing the name to something like deltas/differences?
|
@elasticmachine merge upstream |
|
@elasticmachine merge upstream |
| expect(result.rows.map((row) => row.output)).toEqual([undefined, 7 - 5, 3 - 7, 2 - 3]); | ||
| }); | ||
|
|
||
| it('casts values to number before calculating cumulative sum for NaN like values', () => { |
There was a problem hiding this comment.
| it('casts values to number before calculating cumulative sum for NaN like values', () => { | |
| it('casts values to number before calculating derivative for NaN like values', () => { |
|
@flash1293 now when I am looking at the code again, I feel like there's possibly one test missing – all works well, but as we have some non-strict equality check, could we include testing of '0's (zeros)? |
|
@mbondyra Great suggestion, I added a test for this. |
|
@elasticmachine merge upstream |
💚 Build SucceededMetrics [docs]@kbn/optimizer bundle module count
distributable file count
page load bundle size
History
To update your PR or re-run it, just comment with: |
* master: Add derivative function (elastic#81178) [Discover] Deangularize context_app.html, part 3 (elastic#81838) [Visualize] Vis listing page breaks on unknown vis type (elastic#82018) Rename `batchSize` parameter to `batch_size` to be consisten with the API namings guidelines. (elastic#82123) Minor edits in Single Metric Viewer (elastic#82159) [Actions] Fix type contract (elastic#82168) Upgrade EUI to v30.1.1 (elastic#81499) Skip failing ES snapshot test (elastic#82207) Skip ES snapshot failing suite (elastic#82206) [Alerting UI] Grouped list of alert types using producers in Types filter of Alerts tab (elastic#81876) [Maps] convert vector style component to typescript round 1 (elastic#81961) Fix link to upgrade assistant (elastic#82138) Rename "service overview" to "service inventory" (elastic#81933) adjust policy test to drop test for server addresses (elastic#82120) Cleanup/codeowners (elastic#82146) [DOCS] Updates add data content (elastic#81093) [DOCS] Remove index mgmt docs (elastic#82099) [Search] fix cancelation related memory leaks (elastic#81996)
…e-details-overlay * 'master' of github.com:elastic/kibana: (72 commits) [CCR] Update README.md on how to start 2 clusters for testing (elastic#81487) [APM] Scale transaction rate correctly (elastic#82155) Upgrade to hapi version 18 (elastic#80468) [Uptime] Remove custom handling of license enabling (elastic#82019) [Telemetry] Remove `from` and `to` timestamps from usage stats APIs (elastic#81579) Enable send to background in Vega (elastic#82229) Enable send to background in Timelion (elastic#82232) [Actions & Connectors] removes Connector flyouts after usage (elastic#82126) Add derivative function (elastic#81178) [Discover] Deangularize context_app.html, part 3 (elastic#81838) [Visualize] Vis listing page breaks on unknown vis type (elastic#82018) Rename `batchSize` parameter to `batch_size` to be consisten with the API namings guidelines. (elastic#82123) Minor edits in Single Metric Viewer (elastic#82159) [Actions] Fix type contract (elastic#82168) Upgrade EUI to v30.1.1 (elastic#81499) Skip failing ES snapshot test (elastic#82207) Skip ES snapshot failing suite (elastic#82206) [Alerting UI] Grouped list of alert types using producers in Types filter of Alerts tab (elastic#81876) [Maps] convert vector style component to typescript round 1 (elastic#81961) Fix link to upgrade assistant (elastic#82138) ...
Related to #61775
This adds a derivative expression function similar to the existing cumulative sum function, pulling some helpers into a shared file.
Similar to #80129