-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
EQL: code cleanup and further tests #58458
Conversation
Pinging @elastic/es-ql (:Query Languages/EQL) |
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. Nice work adding all those missing tests!
Left a couple of minor questions.
@@ -85,6 +85,10 @@ public ConcatFunctionProcessor asProcessor() { | |||
return new ConcatFunctionProcessor(processors); | |||
} | |||
|
|||
public List<Pipe> values() { |
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.
Is public necessary? can it be package private?
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, can be package private.
@@ -559,7 +559,7 @@ private Object makeMap(Class<? extends Node<?>> toBuildClass, ParameterizedType | |||
|
|||
private int randomSizeForCollection(Class<? extends Node<?>> toBuildClass) { | |||
int minCollectionLength = 0; | |||
int maxCollectionLength = 10; | |||
int maxCollectionLength = 3; |
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.
Why did you reduce this?
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.
Good catch. That's a leftover from an attempt to add EqlNodeSubclassTests to EQL. Will revert it.
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!
Add FunctionPipe tests to all functions. Cleanup functions code. (cherry picked from commit 0f83d57)
string
andsubstring
functionsinput
named parameter to avoid confusion with the already existentsource
,src
in all functions related classesA wide NodeSubclass test class to be added later with #53862.
Addresses #54568.