-
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] optimize percentiles fetching #131875
[Lens] optimize percentiles fetching #131875
Conversation
rename id map and restoration function for greater clarity
(introduces infinite loop that need troubleshooting)
x-pack/plugins/lens/public/indexpattern_datasource/to_expression.ts
Outdated
Show resolved
Hide resolved
x-pack/plugins/lens/public/indexpattern_datasource/to_expression.ts
Outdated
Show resolved
Hide resolved
Known issues
|
@elasticmachine merge upstream |
bcf565b
to
4ea17ed
Compare
export const renameColumns: RenameColumnsExpressionFunction = { | ||
name: 'lens_rename_columns', | ||
export const renameColumns: MapToOriginalColumnsExpressionFunction = { | ||
name: 'lens_map_to_original_columns', |
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.
What do we think about this expression function name change? I understand that lens_rename_columns
was meant to be general wording, but it isn't used anywhere else and this name more clearly communicates how the function is actually used IMO.
If it seems better to others as well, I can rename the files to be consistent.
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.
@dej611 any feelings on this one?
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.
No strong opinion here.
Just noticed there's a mention of lens_rename_columns
into x-pack/plugins/lens/server/migrations/saved_object_migrations.test.ts
to be migrated
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.
Good catch on the mentions. But, I'm not sure we should change those expressions since they're in tests for previous Kibana versions. WDYT?
x-pack/plugins/lens/public/indexpattern_datasource/to_expression.ts
Outdated
Show resolved
Hide resolved
Pinging @elastic/kibana-vis-editors @elastic/kibana-vis-editors-external (Team:VisEditors) |
@elasticmachine merge upstream |
…rewctate/kibana into 126941/optimize-percentiles-fetching
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.
Tested thoroughly with time shifts and filters and works great 👍
Left some minor + nitpick comments on the code.
x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/percentile.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/percentile.tsx
Show resolved
Hide resolved
x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/percentile.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/lens/public/indexpattern_datasource/to_expression.ts
Outdated
Show resolved
Hide resolved
x-pack/plugins/lens/public/indexpattern_datasource/to_expression.ts
Outdated
Show resolved
Hide resolved
@elasticmachine merge upstream |
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.
Can approve right now, while waiting for some more feedback on the naming issue.
@elasticmachine merge upstream |
💚 Build SucceededMetrics [docs]Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
Summary
Resolve #126941
This PR optimizes the multiple percentile dimensions scenario by condensing them into fewer percentile aggregations where possible.
It also adds an optional
optimizeEsAggs
method the theOperation
interface so that more of these expression optimizations can be made in the future.Checklist