Skip to content
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

FilterResults : Add root plug #4181

Merged
merged 4 commits into from
Mar 30, 2021

Conversation

johnhaddon
Copy link
Member

This isolates the search to root and its descendants. It could be used for optimisation, but I'm actually aiming to use it in conjunction with the new Parent.parentVariable feature from #4178 to faciliate some new patterns for processing subtrees and placing the result at the subtree root.

@johnhaddon johnhaddon self-assigned this Mar 25, 2021
@danieldresser-ie
Copy link
Contributor

Looks good. I do kind of wonder about generalization ... what if you had a list of paths and wanted to search under all of them? But I guess that would be more of a job for a filter intersection node. This code looks like quite a clean and simple extension

@johnhaddon
Copy link
Member Author

Yeah, I wondered about generalisation too, but came to the same conclusion as you. I think there's merit in making the simple case very simple, and then falling back to "use a more complex filter" for the complex case. Part of the reason I liked this though was that it made the prototype I'm making at the moment trivial to construct. I'm not sure the final thing is going to need it though, so I'll leave this open a little while to see if anyone voices an alternative opinion.

The overlapping-but-mismatched functionality between `parallelTraverse()` and `parallelProcessLocations()` is a mess, and longer term I think we should be adding filtering to `parallelProcessLocations()` and deprecating `parallelTraverse()`. But doing that without breaking changes is a little bit thorny, so this will suffice for now.
@johnhaddon johnhaddon merged commit 67e83e3 into GafferHQ:0.59_maintenance Mar 30, 2021
@johnhaddon johnhaddon deleted the filterResultsRoot branch April 9, 2021 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants