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

[ES|QL] Reduce number of iterations on null columns #176174

Merged
merged 6 commits into from
Feb 6, 2024

Conversation

dej611
Copy link
Contributor

@dej611 dej611 commented Feb 2, 2024

Summary

Follow up on #174585

Less code, less iterations.

@dej611 dej611 added Feature:Discover Discover Application Feature:ExpressionLanguage Interpreter expression language (aka canvas pipeline) release_note:skip Skip the PR/issue when compiling release notes backport:skip This commit does not require backporting Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. Feature:ES|QL ES|QL related features in Kibana v8.13.0 labels Feb 2, 2024
@dej611
Copy link
Contributor Author

dej611 commented Feb 2, 2024

/ci

@stratoula
Copy link
Contributor

/ci

@stratoula
Copy link
Contributor

Seems fine but I want ci to run first

@dej611
Copy link
Contributor Author

dej611 commented Feb 5, 2024

/ci

@dej611 dej611 marked this pull request as ready for review February 5, 2024 10:42
@dej611 dej611 requested review from a team as code owners February 5, 2024 10:42
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)

Copy link
Contributor

@stratoula stratoula left a comment

Choose a reason for hiding this comment

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

Ci would complain if something went wrong but I also tested it locally in Chrome and everything works as expected. Thanx Marco for the follow up!

meta: { type: normalizeType(type) },
isNull: true,
})) ?? [];
allColumns.sort((a, b) => Number(a.isNull) - Number(b.isNull));
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we sort? I think in UI it's ordered by name anyway.

Copy link
Contributor

Choose a reason for hiding this comment

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

Because with ?drop_null_columns you get only the values from non empty columns.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes but what would not work without sorting on allColumns?

Copy link
Contributor

Choose a reason for hiding this comment

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

No because you might have:

[{colA: null}, {colB: not null}, {colC: null},  {colD: not null}]

but on the values you get only

[1, 'a'] --> 1 is the value of col B and 'a' the value of colD

so if you don't put the null columns in the end then you are not having a correct match between your columns and values.

Copy link
Contributor

Choose a reason for hiding this comment

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

Got it. Do we have a test to make sure that values are read correctly according to columns?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes I added one in my PR (the one we merged)

Copy link
Contributor

@jughosta jughosta left a comment

Choose a reason for hiding this comment

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

LGTM 👍

src/plugins/data/common/search/expressions/esql.ts Outdated Show resolved Hide resolved
@dej611
Copy link
Contributor Author

dej611 commented Feb 6, 2024

/ci

@kibana-ci
Copy link
Collaborator

💚 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
data 415.6KB 415.6KB -67.0B

History

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

@dej611 dej611 merged commit 24d3619 into elastic:main Feb 6, 2024
19 checks passed
fkanout pushed a commit to fkanout/kibana that referenced this pull request Feb 7, 2024
## Summary

Follow up on elastic#174585

Less code, less iterations.

---------

Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
Co-authored-by: Stratoula Kalafateli <stratoula1@gmail.com>
Co-authored-by: Julia Rechkunova <julia.rechkunova@gmail.com>
CoenWarmer pushed a commit to CoenWarmer/kibana that referenced this pull request Feb 15, 2024
## Summary

Follow up on elastic#174585

Less code, less iterations.

---------

Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
Co-authored-by: Stratoula Kalafateli <stratoula1@gmail.com>
Co-authored-by: Julia Rechkunova <julia.rechkunova@gmail.com>
fkanout pushed a commit to fkanout/kibana that referenced this pull request Mar 4, 2024
## Summary

Follow up on elastic#174585

Less code, less iterations.

---------

Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
Co-authored-by: Stratoula Kalafateli <stratoula1@gmail.com>
Co-authored-by: Julia Rechkunova <julia.rechkunova@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:Discover Discover Application Feature:ES|QL ES|QL related features in Kibana Feature:ExpressionLanguage Interpreter expression language (aka canvas pipeline) release_note:skip Skip the PR/issue when compiling release notes Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. v8.13.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants