MCRE-BE opened a new issue, #42119:
URL: https://github.com/apache/arrow/issues/42119

   ### Describe the usage question you have. Please include as many useful 
details as  possible.
   
   
   Maybe a dumb question, but I don't see why it doesn't work.
   I need a way to create a dynamic filter based on input.
   
   This code runs fine
   ```python
   compute_expression = [pc.field(col).isin(d[col].unique().tolist()) for col 
in subset]
   compute_expression = functools.reduce(operator.and_, compute_expression)
   compute_expression = pc.invert(compute_expression)
   temp = pd.read_parquet(file_name, filters=compute_expression)
   ```
   
   The following code produces an error : 
   ```python
   compute_expression = [pc.field(col).isin(d[col].unique().tolist()) for col 
in subset]
   compute_expression = functools.reduce(pc.and_, compute_expression)
   compute_expression = pc.invert(compute_expression)
   temp = pd.read_parquet(file_name, filters=compute_expression)
   
   > ArrowKeyError: No function registered with name: and_
   ```
   
   The expression looks like this : 
   ```python
   <pyarrow.compute.Expression invert(and_(is_in(Promo Year, {value_set=int64:[
     2024
   ], null_matching_behavior=MATCH}), is_in(Promo Week, {value_set=int64:[
     2,
     3,
     4, ...], null_matching_behavior=MATCH})))>
   ```
   
   ### Component(s)
   
   Python


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