-
Notifications
You must be signed in to change notification settings - Fork 613
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
feat: validate input references are consistent with the input schema #7193
Conversation
Codecov Report
@@ Coverage Diff @@
## main #7193 +/- ##
==========================================
+ Coverage 73.12% 73.14% +0.01%
==========================================
Files 1055 1056 +1
Lines 168949 169022 +73
==========================================
+ Hits 123545 123625 +80
+ Misses 45404 45397 -7
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
699cccc
to
120cfbb
Compare
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.
LGTM. Should we only enable these checks in debug mode?
I was also thinking about this problem and was not sure whether to add IMHO:
BTW there are already many other assertions and we havn't systematically considered how to use assertions 🤔 |
My concern is about performance, because we need to visit the entire plan exprs several times. Most of our CI tests run in debug mode and once some bugs are found we can still catch them. |
If so do we also change these to assert!(*plan.distribution() == Distribution::Single, "{}", plan);
assert!(!has_batch_exchange(plan.clone()), "{}", plan); Oh the first one should be cheap. The validation in this PR visits all expressions and thus is also more expensive than the second one. 🤔 Yes it's expensive. Let's ban it |
I hereby agree to the terms of the Singularity Data, Inc. Contributor License Agreement.
What's changed and what's your intention?
So that bugs like #7158 can be found earlier in frontend instead of backend.