ESQL: Tools for testing Operators#141778
Merged
nik9000 merged 10 commits intoelastic:mainfrom Feb 3, 2026
Merged
Conversation
Collaborator
|
Pinging @elastic/es-analytical-engine (Team:Analytics) |
nik9000
commented
Feb 3, 2026
| return results; | ||
| } | ||
|
|
||
| public static void runDriver(Driver driver) { |
Member
Author
There was a problem hiding this comment.
I'm running down why we had these duplicate methods. Don't merge this yet.
Member
Author
There was a problem hiding this comment.
It looks like it was created when we built union types. @craigtaverner, do you remember why we have these methods instead of calling the standard utilities? Do we need a longer timeout here? That looks like the only difference.
I think it should be safe to zap that. At worse we'll get some test failure in CI, but we can work through those.
jfreden
pushed a commit
to jfreden/elasticsearch
that referenced
this pull request
Feb 4, 2026
We were growing more and more and more options to `OperatorTestCase.runDriver`. I need another option in elastic#141672 so I built a builder-style test utility. This removes the original methods, migrating all callers. I've been quite liberal adding utility methods. Those are cheap in a builder-style helper because you don't have to think in terms of combinatorial explosions of parameter - just in terms of "how do I set up all the bits". Now there are ten ways to set the inputs. It's tempting to make some higher level utility methods that call these - or make the common call sites shorter. You init the most common helper like: ``` new TestDriverRunner().builder(driverContext()) ``` But I didn't want it to look like magic. Readers should see this and think, "I can add things before `builder`" and "I can add things to this `builder`."
spinscale
pushed a commit
to spinscale/elasticsearch
that referenced
this pull request
Feb 4, 2026
We were growing more and more and more options to `OperatorTestCase.runDriver`. I need another option in elastic#141672 so I built a builder-style test utility. This removes the original methods, migrating all callers. I've been quite liberal adding utility methods. Those are cheap in a builder-style helper because you don't have to think in terms of combinatorial explosions of parameter - just in terms of "how do I set up all the bits". Now there are ten ways to set the inputs. It's tempting to make some higher level utility methods that call these - or make the common call sites shorter. You init the most common helper like: ``` new TestDriverRunner().builder(driverContext()) ``` But I didn't want it to look like magic. Readers should see this and think, "I can add things before `builder`" and "I can add things to this `builder`."
mamazzol
pushed a commit
to mamazzol/elasticsearch
that referenced
this pull request
Feb 5, 2026
We were growing more and more and more options to `OperatorTestCase.runDriver`. I need another option in elastic#141672 so I built a builder-style test utility. This removes the original methods, migrating all callers. I've been quite liberal adding utility methods. Those are cheap in a builder-style helper because you don't have to think in terms of combinatorial explosions of parameter - just in terms of "how do I set up all the bits". Now there are ten ways to set the inputs. It's tempting to make some higher level utility methods that call these - or make the common call sites shorter. You init the most common helper like: ``` new TestDriverRunner().builder(driverContext()) ``` But I didn't want it to look like magic. Readers should see this and think, "I can add things before `builder`" and "I can add things to this `builder`."
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We were growing more and more and more options to
OperatorTestCase.runDriver. I need another option in #141672 so I built a builder-style test utility. This removes the original methods, migrating all callers.I've been quite liberal adding utility methods. Those are cheap in a builder-style helper because you don't have to think in terms of combinatorial explosions of parameter - just in terms of "how do I set up all the bits". Now there are ten ways to set the inputs.
It's tempting to make some higher level utility methods that call these - or make the common call sites shorter. You init the most common helper like:
But I didn't want it to look like magic. Readers should see this and think, "I can add things before
builder" and "I can add things to thisbuilder."