You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/07/04 02:04:10 UTC

[GitHub] [arrow-datafusion] liukun4515 opened a new issue, #2833: InList: merge check branch

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

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


[GitHub] [arrow-datafusion] tustvold closed issue #2833: InList: merge check branch

Posted by GitBox <gi...@apache.org>.
tustvold closed issue #2833: InList: merge check branch
URL: https://github.com/apache/arrow-datafusion/issues/2833


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

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