blaginin opened a new issue, #15178:
URL: https://github.com/apache/datafusion/issues/15178

   ### Is your feature request related to a problem or challenge?
   
   Follow up on https://github.com/apache/datafusion/pull/15165, related to 
https://github.com/apache/datafusion/issues/10373
   
   We currently have a lot of inline assertions when something is tested 
against a large pre-defined string(s). For example: 
   
   
https://github.com/apache/datafusion/blob/main/datafusion/core/tests/dataframe/mod.rs#L2472-L2496
   
   The issue with this approach is that every time we update logic, each of 
those tests needs to be updated manually. To make updates faster and easier, 
we're switching to insta. This issue will be a collection of small 
good-first-issue tickets to complete the transition. 
   
   ## Tickets to pick up
   - [ ] todo
   
   In addition to the previous list, you can manually find places to rewrite 
logic. Generally, everything that uses `assert_batches_sorted_eq`, 
`assert_batches_eq`, `assert_contains`, or just compares with a very big string 
is a good candidate. 
   
   
   ### Describe the solution you'd like
   
   We should switch those assertions to `insta` You can see one example of this 
transition in https://github.com/apache/datafusion/pull/15165
   
   I made that change manually using IDE replace tools and a bit of regex. 
Initially, I just put `@"placeholder"` as a RHS and then ran `cargo insta test` 
to fill gaps and then confirmed it's the same as before via git diff. It didn't 
take a lot of time, but I think there are ways to make it faster:
   - https://github.com/getgrit/gritql
   - rust-analyzer Structured Search Replace 
   - Cursor / Other AI tool ☠️
   
   ### Describe alternatives you've considered
   
   _No response_
   
   ### Additional context
   
   _No response_


-- 
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: github-unsubscr...@datafusion.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to