2010YOUY01 commented on issue #23839:
URL: https://github.com/apache/datafusion/issues/23839#issuecomment-5235519842

   > We could add cargo-mutants to the checklist an agent follows after making 
changes. Here are the [docs](https://mutants.rs/welcome.html). Essentially, it 
injects small changes into the source code (a flipped comparison, a swapped 
return value) and checks whether the tests catch them. It gives some assurance 
that the tests are robust, if a mutant is uncaught then the agent and developer 
can iterate.
   > 
   > Something like, `cargo mutants --in-diff <diff> --package <crate>` keeps 
the scope to just the local change set so it can be run before a PR.
   
   This is a good idea, I have thought about it and there are two challenges if 
we want to implement it:
   1. Identifying and fixing all existing code for mutation tests failure can 
be too expensive, so ideally we want to only mutate the PR diff
   2. The following case seems quite common in datafusion, but it's a false 
positive for mutation tests. We need a way to skip them
   ```
   # Mutating the `cond` won't fail any test, and it's expected
   if cond:
       fast_path()
   else:
       fallback()
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to