-
-
Notifications
You must be signed in to change notification settings - Fork 358
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
review: feature: Parent function #1211
Conversation
147fca3
to
6d93ad1
Compare
What's the responsibility of ParentFunction? |
It is a simple function which iterates over all parents, starting from nearest parent and ending on model root package. |
6d93ad1
to
635ac73
Compare
635ac73
to
f3dfacd
Compare
Hi Pavel, Could you update testParentFunction to give an example of when and how using Is there an order to review and merge your remaining PRs? |
ok, but on Saturday. The example is something like
|
There is already test code assertSame(varStrings.getParent(), varStrings.map(new ParentFunction().includingSelf(false)).first()); which internally uses I do not understand, what else should be added. May be you mean: "Some code which demonstrates how client should use that?" No. Client does not have to be aware of that there is an setQuery method. It is called automatically behind the scene. It should stay hidden for clients. It is a way how to let authors of mapping functions to make them more optimal - to early terminated, if no more results are needed. It is nothing for clients of these functions. So nothing to write into test. And it is actually impossible to test that ParentFunction really terminated early. It would need a hook (special testing code) in implementation of CtQueryImpl |
Thanks for the explanation and well focused PR. |
The ParentFunction can now early terminate too.
This PR is ready for review