alamb opened a new issue, #9727:
URL: https://github.com/apache/arrow-datafusion/issues/9727

   As part of https://github.com/apache/arrow-datafusion/pull/9725 we had to 
disable a newly added clippy lint to get CI to pass
   
   However it looks like the clippy lint is flagging a potential real issue
   
                 @waynexia please check this
   
   I suppressed the warning but clippy requires `.truncate` to be called before 
file creation
   
   ```
     --> datafusion/substrait/src/serializer.rs:32:39
      |
   32 |     let mut file = 
OpenOptions::new().create(true).write(true).open(path)?;
      |                                       ^^^^^^^^^^^^- help: add: 
`.truncate(true)`
      |
      = help: if you intend to overwrite an existing file entirely, call 
`.truncate(true)`
      = help: if you instead know that you may want to keep some parts of the 
old file, call `.truncate(false)`
      = help: alternatively, use `.append(true)` to append to the file instead 
of overwriting it
      = help: for further information visit 
https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_open_options
      = note: `-D clippy::suspicious-open-options` implied by `-D warnings`
      = help: to override `-D warnings` add 
`#[allow(clippy::suspicious_open_options)]`
   ```
   
   _Originally posted by @comphead in 
https://github.com/apache/arrow-datafusion/pull/9725#discussion_r1534174055_
               


-- 
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...@arrow.apache.org.apache.org

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

Reply via email to