-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add selector method capabilities to selectors #4827
Add selector method capabilities to selectors #4827
Conversation
Initial attempt, seems to be working but not such a fan of injecting the |
@jtcohen6 any capacity this month for the team to review? |
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 looks pretty good. I see that you have a checkbox unchecked for circular dependencies though. Do you have an idea of how to handle that? It might be tricky to handle robustly, but it would be good to create a test case with circular dependencies and see what error occurs. Catching the error at a higher level would probably be fine (if possible). A python error for recursiveness would be not optimal...
Oh, also we now use 'changie' for the changelog, so the CHANGELOG.md should not be changed from main. See: https://github.com/dbt-labs/dbt-core/blob/main/CONTRIBUTING.md#adding-changelog-entry |
I was hoping to get some guidance on this. Is this something you can help with @gshank ? |
That part will probably be a bit tricky. I think we'd have to keep a list of already encountered selectors in this branch of the tree and check if this selector was encountered higher up. I haven't touched this code in a while, so I'd have to pull it apart a bit further to figure out where that would have to go. For recursive functions, I generally just pass along a list of names that I check... |
@gshank any chance I can get some help to get this over the line? Please and thank you in advance! |
I won't have time today, but I'll try to find some time to take a look this week. |
I did some testing and it looks like we don't end up with recursion, we just get "Existing selector definition for not found." Which is pretty innocuous. |
resolves #4821
Description
Add selector method in order to be able to define a selector with another selector definition.
To Do
Checklist
CHANGELOG.md
and added information about my change