[Lens] [ES|QL] Add helper to map the value to the corresponding column#261581
Merged
mariairiartef merged 13 commits intoelastic:mainfrom Apr 20, 2026
Merged
Conversation
mariairiartef
commented
Apr 8, 2026
Contributor
|
Pinging @elastic/kibana-visualizations (Team:Visualizations) |
mariairiartef
commented
Apr 15, 2026
mariairiartef
commented
Apr 16, 2026
3e866ab to
8f7db61
Compare
Contributor
Author
|
/ci |
walterra
approved these changes
Apr 17, 2026
Contributor
walterra
left a comment
There was a problem hiding this comment.
LGTM. Reproduced the original issue on main, verified this PR fixes it. Added some suggestions but no blockers.
| return values; | ||
| } | ||
|
|
||
| return values.map((row) => { |
Contributor
There was a problem hiding this comment.
I played around with a small improvement on this:
// Pre-compute which value column index each display column maps to (-1 if missing)
const indexMap = displayColumns.map((col) => valueColumns.findIndex((v) => v.name === col.name));
// For each row, pick values by index; fill null for columns with no data
return values.map((row) => indexMap.map((i) => (i >= 0 ? row[i] : null)));
Instead of byName on each row, it will create indexMap only once and reuse it. Can you tell if this might work or do we need to consider the actual row each time? The above at least passes the new tests you created :).
Contributor
Author
There was a problem hiding this comment.
Thanks for the suggestion! I think it makes sense, applied you suggestion here
Contributor
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]Async chunks
History
|
justinkambic
added a commit
to justinkambic/kibana
that referenced
this pull request
Apr 20, 2026
The lens entry bundle was 72-83B over its 86,000B page-load limit after rebasing this branch on main. Nothing in this PR's scope (kbn-unified-chart-section-viewer + one Discover test spec) can reach lens's bundle — a codebase-wide grep shows zero imports of @kbn/unified-chart-section-viewer from x-pack/platform/plugins/shared/lens, and a local dist build's stats.json contains no matching module paths. Cumulative drift from recent Lens-as-code commits that merged into main (e.g., elastic#262871, elastic#264134, elastic#261581, elastic#264147, elastic#263810) pushed the entry bundle just over the line. Raising the limit here is the documented path when no in-PR contribution is found. Limit set via `node scripts/build_kibana_platform_plugins --focus lens --update-limits`.
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
Fix #261912
Adds helper to match the values to the columns displayed.
After
Checklist
release_note:*label is applied per the guidelinesbackport:*labels.