-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
Painless: Move and Rename Several Methods in the lookup package #32105
Conversation
Pinging @elastic/es-core-infra |
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
|
||
public final class PainlessLookupUtility { | ||
|
||
// The following terminology is used for variable names throughout the lookup package: |
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.
Please move this to a javadoc on the class, and add a general description as to why this class exists.
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.
Will do.
// Under ambiguous circumstances most variable names are prefixed with asm, java, or painless. | ||
// If the variable name is the same for asm, java, and painless, no prefix is used. | ||
|
||
public static Class<?> javaObjectTypeToPainlessDefType(Class<?> javaType) { |
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.
a brief one liner would be nice on most of these methods, especially since at a glance, you would think this would always return def.class
, but an explanation of the array case necessary would be nice. These could be in a followup since I know they are just moving here and were undocumented in their previous location.
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.
Yes, once I'm done with the functional changes I'll go back and ensure everything is documented.
@rjernst Thanks for the review! Will commit once CI completes. |
@elasticmachine test this please |
* es/6.x: Scripting: Remove dead code from painless module (#32064) (#32104) Painless: Move and Rename Several Methods in the lookup package (#32105) Bypass highlight query terms extraction on empty fields (#32090) Core: Backport java time date formatters (#31997) Switch non-x-pack to new style requests (#32106) SQL: allow LEFT and RIGHT as function names (#32066) Painless: Separate PainlessLookup into PainlessLookup and PainlessLookupBuilder (#32054) [test] turn on host io cache for opensuse (#32053) DOCS: put LIMIT 10 to the SQL query (#32065)
* es/master: Add Index UUID to `/_stats` Response (#31871) Painless: Move and Rename Several Methods in the lookup package (#32105) Bypass highlight query terms extraction on empty fields (#32090) Switch non-x-pack to new style requests (#32106) [Rollup] Add new capabilities endpoint for concrete rollup indices (#30401) Revert "[test] disable packaging tests for suse boxes" SQL: allow LEFT and RIGHT as function names (#32066) DOCS: put LIMIT 10 to the SQL query (#32065) [test] turn on host io cache for opensuse (#32053) Tweaked Elasticsearch Service links for SEO
Mechanical change. Moves several shared static methods into a new PainlessLookupUtility class. These are used by both PainlessLookupBuilder and PainlessLookup along with several of the node classes for conversion between type names and types and java classes to painless classes.