Skip to content
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

[Expressions] Partial results example plugin #113001

Merged
merged 3 commits into from
Sep 27, 2021
Merged

Conversation

dokmic
Copy link
Contributor

@dokmic dokmic commented Sep 23, 2021

Summary

Resolves #108682.

This PR also changes the mapColumn function implementation to support partial results.

At first, the idea was to emit table rows gradually upon expression resolution, but it affects the performance significantly. The implementation using merge will emit the number of values equals to the rows number. Using all possible optimizations, the duration was tripled on the demo data (about 3000 rows), which was unacceptably slow.

In the result, the best solution was to use combineLatest and wait until the expression emits at least one value for every row. That doesn't affect the performance of the function and adds support of the partial results if the underlying expression emits multiple values.

Checklist

For maintainers

@dokmic dokmic added Feature:ExpressionLanguage Interpreter expression language (aka canvas pipeline) review Team:AppServices v7.16.0 release_note:skip Skip the PR/issue when compiling release notes v8.0.0 labels Sep 23, 2021
@dokmic dokmic marked this pull request as ready for review September 23, 2021 18:44
@dokmic dokmic requested a review from a team as a code owner September 23, 2021 18:44
@dokmic dokmic requested a review from ppisljar September 27, 2021 08:58
Copy link
Member

@ppisljar ppisljar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kibanamachine
Copy link
Contributor

💚 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
expressions 128.3KB 128.3KB -1.0B

History

  • 💚 Build #155402 succeeded 869e3d120f7ea881a8b394996cad8ee94d8fe8a1
  • 💔 Build #155394 failed fcee671b86d016b0a5f188e8d7241f1ed117897d

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

@dokmic dokmic merged commit 16aa9bf into elastic:master Sep 27, 2021
@dokmic dokmic deleted the feature/108682 branch September 27, 2021 16:54
dokmic added a commit that referenced this pull request Sep 27, 2021
* Update mapColumn expression function implementation to support partial results
* Add partial results example plugin
# Conflicts:
#	.github/CODEOWNERS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:ExpressionLanguage Interpreter expression language (aka canvas pipeline) release_note:skip Skip the PR/issue when compiling release notes review v7.16.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Expressions] Implement partial results demo plugin
3 participants