-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add max depth option to ExecutableNormalizedOperationFactory #3268
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
Conversation
| int curLevel, | ||
| int maxLevel) { | ||
| if (curLevel > maxLevel) { | ||
| throw new AbortExecutionException("Maximum query depth exceeded " + curLevel + " > " + maxLevel); |
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.
Copied this from MaxQueryDepthInstrumentation but let me know if I should make a more specific exception class.
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.
This makes sense - this is our stop exception class
| private final Locale locale; | ||
|
|
||
| public List<PossibleMerger> possibleMergerList = new ArrayList<>(); | ||
| private final List<PossibleMerger> possibleMergerList = new ArrayList<>(); |
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.
No reason for it to be public or not-final. The class is marked as@Internal so shouldn't break anything.
| */ | ||
| @PublicApi | ||
| public class ExecutableNormalizedOperationFactory { | ||
| public static class Options { |
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.
Added this new Options class which mimicks the Options pattern seen in the repo.
This stores things not directly related to the operation info.
|
Adding this code so we can remove reliance on |
| public int getMaxChildrenDepth() { | ||
| return maxChildrenDepth; | ||
| } | ||
| } |
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.
Nice one!
but can we have some javadoc on what they do please since its API
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.
Done 😄
| public List<PossibleMerger> getPossibleMergerList() { | ||
| return possibleMergerList; | ||
| } | ||
|
|
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.
nice one
dondonz
left a comment
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.
Great!
bbakerman
left a comment
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.
Great idea
No description provided.