-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Tiny: Add InExpression argument check #19229
Conversation
I am not sure we need to add this validation as it is all provider code and highly unlikely to end up with both non-null unless typo or intentionally badly written code. |
I agree it's highly unlikely, it's just a validation check which also documents the invariant of this class. Is there any downside? |
Downside is maintenance. We have a lot of invariant in query pipeline, we don't have validation checks which throws exception for every one of them. We could add those but cost of maintaining them/updating them if anything changes is high compared value it provides. |
I'm not saying we should start a systematic search of all unexpressed invariants or anything. This is just something I came across which doesn't cost anything to do and improves correctness/readability a bit. We can do these opportunistically as we come across them (like I did here). I don't think this single correctness check adds any burden of maintenance. |
Blocked on #19233 |
dac2192
to
313983d
Compare
313983d
to
4f092a7
Compare
@smitpatel moved the check from the constructor to Update as requested. |
Just to tighten things up, it's currently possible to construct in invalid InExpression via Update.