[Lens] [ES|QL] Improved ES|QL conversion failure tooltip messages#249683
Merged
walterra merged 16 commits intoelastic:mainfrom Jan 23, 2026
Merged
[Lens] [ES|QL] Improved ES|QL conversion failure tooltip messages#249683walterra merged 16 commits intoelastic:mainfrom
walterra merged 16 commits intoelastic:mainfrom
Conversation
Introduces specific failure reasons when ES|QL conversion is not possible: - non_utc_timezone: Timezone is not UTC - formula_not_supported: Lens formulas cannot be converted - time_shift_not_supported: Time shift operations not supported - runtime_field_not_supported: Runtime fields not supported - reduced_time_range_not_supported: Reduced time range not supported - function_not_supported: Operation type has no ES|QL equivalent - drop_partials_not_supported: Drop partial buckets not supported - include_empty_rows_not_supported: Include empty rows not supported - terms_not_supported: Terms aggregation not supported - unknown: Catch-all for unexpected failures Changes: - getESQLForLayer now returns EsqlQueryResult (success with data OR failure with reason) - Added isEsqlQuerySuccess type guard for safe property access - Updated to_expression.ts to use new type guard - Updated use_esql_conversion.tsx to use new type guard - Updated all tests to use new result structure This enables better UX by showing users exactly why conversion failed.
Contributor
|
Pinging @elastic/kibana-visualizations (Team:Visualizations) |
mariairiartef
approved these changes
Jan 21, 2026
Contributor
💔 Build Failed
Failed CI StepsHistory
cc @walterra |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Part of https://github.com/elastic/kibana-team/issues/2179. Fixes #249912.
Adds some more granular failure reasons for ES|QL conversion:
non_utc_timezone- Timezone is not UTCformula_not_supported- Lens formulas cannot be convertedtime_shift_not_supported- Time shift operations not supportedruntime_field_not_supported- Runtime fields not supportedreduced_time_range_not_supported- Reduced time range not supportedfunction_not_supported- Operation type has no ES|QL equivalentdrop_partials_not_supported- Drop partial buckets not supportedinclude_empty_rows_not_supported- Include empty rows not supportedterms_not_supported- Terms aggregation not supportedunknown- Catch-all for unexpected failuresgetESQLForLayernow returnsEsqlQueryResult(success with data ORfailure with reason)
Added
isEsqlQuerySuccesstype guard for safe property accessChecklist
cursor-cliwithopus-4.5