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
Optimize aggregate_field_name method in field_mappings #373
Conversation
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
jenkins test this please |
Now, this also closes #251 |
@V1NAY8 Could you separate these two feature contributions into different PRs? It's best to keep them separate so they don't get blocked on each other. I'd also like to have the ML change reviewed by someone else. |
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.
Thanks for this, a couple comments for you!
8fb3143
to
e67fe67
Compare
jenkins test this please |
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.
LGTM, thanks!
The method
aggregatable_field_name
hasself._mappings_capabilities
which is a dataframe.We are querying
dataframe
4 times per method call. Instead query it once and reuse the result.Also this improves readability of the code.
@sethmlarson take a look