-
Notifications
You must be signed in to change notification settings - Fork 25.1k
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
SQL: Register missing processors #35121
Conversation
Add registration (and tests) for missing processors in the serialization chain. Fix elastic#35119
Pinging @elastic/es-search-aggs |
x-pack/plugin/sql/src/test/java/org/elasticsearch/xpack/sql/expression/ProcessorTests.java
Outdated
Show resolved
Hide resolved
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! just a typo in assertion msg
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. Just one question
try { | ||
value = name.get(proc).toString(); | ||
} catch (Exception ex) { | ||
fail(procName + " does NOT provide a String NAME field\n" + ex); |
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.
I am not exactly sure what you are doing here. The toString()
will always give you a String... and get(proc)
can throw an IllegalAccessException
if the field is inaccessible (static, since proc.getField
will check the public
part). So why the "does not provide a String NAME field"? Sorry if I missed something.
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.
toString()
is a shortcut for casting which also checks the value; it fails if the value is null.
The check is really for checking the field is static
- I've updated the message as it was misleading.
Add registration (and tests) for missing processors in the serialization
chain.
Fix #35119