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

   Two `$NEGATED` cases look very similar, is it possible to combine them to 
save code?
   
   e.g.
   
   ```rust
   if $CONTAINS_NULL {
     $ARRAY
       .iter()
       .map(|vop| match vop.map(|v| {
         if $NEGATED { !$VALUES.contains(&v) } else { $VALUES.contains(&v) }
       }) {
         Some(true) if $NEGATED => None,
         Some(false) if !$NEGATED => None,
         x => x,
       })
     .collect::<BooleanArray>()
   } else {
     $ARRAY
       .iter()
       .map(|vop| vop.map(|v| {
         if $NEGATED { !$VALUES.contains(&v) } else { $VALUES.contains(&v) }
       })
       .collect::<BooleanArray>()
   }
   ```
   
   _Originally posted by @viirya in 
https://github.com/apache/arrow-datafusion/pull/2809#discussion_r912515638_


-- 
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]

Reply via email to