Uh oh!
There was an error while loading. Please reload this page.
skip failing tests default to false - #3890
Conversation
comphead
commented
Oct 19, 2022
@andygrove please check this PR. I have commented out 1 test as it fails, will create another PR to fix the test |
# Conflicts: # datafusion/core/src/config.rs
alamb
left a comment
There was a problem hiding this comment.
Thank you @AssHero
My only concern about this approach is that now we are not testing the same thing that users are.
What would we feel about changing the default value of OPT_OPTIMIZER_SKIP_FAILED_RULES to always be true and downstream projects could turn it to true if they wanted.
What do you think @avantgardnerio ?
| false, | ||
| ), | ||
| #[cfg(test)] | ||
| ConfigDefinition::new_bool( |
There was a problem hiding this comment.
| ConfigDefinition::new_bool( | |
| // skip_failing_rules default to true in tests so that regressions are caught much sooner | |
| ConfigDefinition::new_bool( |
| "When set to true, the logical plan optimizer will produce warning \ | ||
| messages if any optimization rules produce errors and then proceed to the next \ | ||
| rule. When set to false, any rules that produce errors will cause the query to fail.", |
There was a problem hiding this comment.
| "When set to true, the logical plan optimizer will produce warning \ | |
| messages if any optimization rules produce errors and then proceed to the next \ | |
| rule.When set to false, any rules that produce errors will cause the query to fail.", | |
| "OVERRIDDEN FOR TEST", |
There was a problem hiding this comment.
I think this could be very confusing to people (that tests and defaults are different) so I suggest some more comments to make it clearer
| Ok(()) | ||
| } | ||
| #[ignore] |
There was a problem hiding this comment.
We should have a ticket to track this failure. How does it fail with the change in default?
did not mean to approve -- I think we should default to true always
| to reduce the number of rows decoded.", | ||
| false, | ||
| ), | ||
| #[cfg(test)] |
There was a problem hiding this comment.
I think this #[cfg(test)] will effectively only apply to tests in the datafusion/core crate -- this option will be false for other tests (like sql_integration for example)
Thanks @alamb for the feedback. |
andygrove
commented
Oct 19, 2022
I think that would be problematic given the current maturity of the optimization rules. It would result in many queries failing rather than just skipping some optimizations. |
alamb
commented
Oct 19, 2022
🤦 I apologize to both of you |
andygrove
left a comment
There was a problem hiding this comment.
I think tests should be explicit about the configs they are testing. I don't think we should have different default values for configs between test and production code.
I'm wondering what is the point of test that works with enabled |
comphead
commented
Oct 20, 2022
Sorry @andygrove, I lost a bit. So you also support disabling failing rules check, ignore tests, and create a new PR to fix them? |
andygrove
commented
Oct 21, 2022
Currently, if any rule fails with an I would like to have regression tests to that we don't introduce any new bugs that cause rules to fail. One approach would be to set Long term I would like the setting to default to false, but we need to fix the bugs first. |
comphead
commented
Oct 22, 2022
@andygrove got your point thanks. Please check renewed PR So idea is by default tests run with enabled |
1 similar comment
comphead
commented
Oct 22, 2022
@andygrove got your point thanks. Please check renewed PR So idea is by default tests run with enabled |
comphead
commented
Oct 25, 2022
@andygrove please check until the code rots |
alamb
commented
Oct 27, 2022
Marking as a draft as it is waiting on review from @andygrove |
andygrove
commented
Oct 27, 2022
Hi @comphead. Apologies for the delay in reviewing. I'm not sure that we want to introduce feature flags for this. I was thinking that we could explicitly set |
comphead
commented
Oct 27, 2022
Thanks @andygrove for feedback. Please correct me if I'm wrong.
If thats correct, I will rework the PR |
andygrove
commented
Nov 17, 2022
Now that #4208 is implemented, I suggest that we:
|
comphead
commented
Nov 17, 2022
Thanks for letting me know, checking this. |
Which issue does this PR close?
Closes#3695.
Rationale for this change
skip_failing_rules defaultto true in tests so that regressions are caught much soonerWhat changes are included in this PR?
Are there any user-facing changes?