jorisvandenbossche commented on code in PR #14360:
URL: https://github.com/apache/arrow/pull/14360#discussion_r991383398


##########
python/pyarrow/_compute.pyx:
##########
@@ -2234,7 +2234,13 @@ cdef class Expression(_Weakrefable):
 
         for argument in arguments:
             if not isinstance(argument, Expression):
-                raise TypeError("only other expressions allowed as arguments")
+                # Attempt to help convert this to an expression
+                try:
+                    import pyarrow.compute as pc
+                    argument = pc.scalar(argument)

Review Comment:
   `pc.scalar` is basically just a wrapper around `Expression._scalar(..)`, 
something that is available in this file. So I think you can use that here 
directly instead of the import



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