[ 
https://issues.apache.org/jira/browse/ARROW-2705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16510621#comment-16510621
 ] 

Dominik Moritz commented on ARROW-2705:
---------------------------------------

I'm trying to build a predicate for multiple columns and it feels a bit clunky. 

let pred: predicate.Predicate | null = null;
for (const [col, extent] of extents) {
  const newPred = predicate
    .col(col)
    .ge(extent[0])
    .and(predicate.col(col).le(extent[1]));
  if (pred) {
    pred = pred.and(newPred);
  } else {
    pred = newPred;
  }
}

> CombinationPredicates should take list of predicates
> ----------------------------------------------------
>
>                 Key: ARROW-2705
>                 URL: https://issues.apache.org/jira/browse/ARROW-2705
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: JavaScript
>            Reporter: Dominik Moritz
>            Priority: Minor
>
> CombinationPredicate like And and Or only take two predicates: left and 
> right. However, it often makes sense to combine more than two predicates. I 
> suggest that `and` and `or` support arbitrarily many arguments. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to