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/05/11 08:38:44 UTC

[GitHub] [arrow] amol- commented on pull request #13099: ARROW-16468: [Python] Test Table filter feature with complex exprs and add Expression.apply method

amol- commented on PR #13099:
URL: https://github.com/apache/arrow/pull/13099#issuecomment-1123364801

   > But we can probably improve that, instead of adding the `apply` method?
   
   Allowing "non expressions" would be risky by the way, as the current check to decide to return back an expression or not is based on `isinstance(args[0], Expression)`. If we allowed plain python types in compute functions when they should return an `Expression` we would introduce ambiguity when `pc.multiply(10, pc.field("a"))` is used. As the first argument is no longer an `Expression`.
   
   To do so we would probably have to change the check to see if _any_ argument is an expression. I guess we can totally live with using `pc.multiply(pc.scalar(10), pc.field("a"))` as we do know and avoid changing the code. 


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