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 2021/01/28 16:04:57 UTC

[GitHub] [arrow] jorisvandenbossche opened a new pull request #9352: ARROW-11412: [Python][Dataset] Disallow logical operators for Expression

jorisvandenbossche opened a new pull request #9352:
URL: https://github.com/apache/arrow/pull/9352


   See https://issues.apache.org/jira/browse/ARROW-11412 for the longer explanation, but since we can't give `and`/`or`/`not` (AFAIK) the expected behaviour for expressions, it seems better to raise an informative error message (instead of relying on basic python behaviour of those).
   
   


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

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



[GitHub] [arrow] pitrou commented on a change in pull request #9352: ARROW-11412: [Python][Dataset] Disallow logical operators for Expression

Posted by GitBox <gi...@apache.org>.
pitrou commented on a change in pull request #9352:
URL: https://github.com/apache/arrow/pull/9352#discussion_r568729026



##########
File path: python/pyarrow/_dataset.pyx
##########
@@ -154,6 +154,13 @@ cdef class Expression(_Weakrefable):
             Py_LE: "less_equal",
         }[op], [self, other])
 
+    def __bool__(self):
+        raise ValueError(
+            "An expression cannot be evaluated to python True or False. "

Review comment:
       Nit: uppercase "Expression"?




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

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



[GitHub] [arrow] jorisvandenbossche closed pull request #9352: ARROW-11412: [Python][Dataset] Disallow logical operators for Expression

Posted by GitBox <gi...@apache.org>.
jorisvandenbossche closed pull request #9352:
URL: https://github.com/apache/arrow/pull/9352


   


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

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



[GitHub] [arrow] pitrou commented on a change in pull request #9352: ARROW-11412: [Python][Dataset] Disallow logical operators for Expression

Posted by GitBox <gi...@apache.org>.
pitrou commented on a change in pull request #9352:
URL: https://github.com/apache/arrow/pull/9352#discussion_r568729026



##########
File path: python/pyarrow/_dataset.pyx
##########
@@ -154,6 +154,13 @@ cdef class Expression(_Weakrefable):
             Py_LE: "less_equal",
         }[op], [self, other])
 
+    def __bool__(self):
+        raise ValueError(
+            "An expression cannot be evaluated to python True or False. "

Review comment:
       Nit: uppercase "Expression"?




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

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



[GitHub] [arrow] github-actions[bot] commented on pull request #9352: ARROW-11412: [Python][Dataset] Disallow logical operators for Expression

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #9352:
URL: https://github.com/apache/arrow/pull/9352#issuecomment-769202644


   https://issues.apache.org/jira/browse/ARROW-11412


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

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