You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Roman Karlstetter (Jira)" <ji...@apache.org> on 2021/01/28 06:26:00 UTC

[jira] [Created] (ARROW-11412) [Python] (C++?) Expression evaluation problem for "and" and "or" expressions

Roman Karlstetter created ARROW-11412:
-----------------------------------------

             Summary: [Python] (C++?) Expression evaluation problem for "and" and "or" expressions
                 Key: ARROW-11412
                 URL: https://issues.apache.org/jira/browse/ARROW-11412
             Project: Apache Arrow
          Issue Type: Bug
          Components: C++, Python
    Affects Versions: 3.0.0, 2.0.0
            Reporter: Roman Karlstetter


There's a problem with boolean "and" and "or" expressions when creating them in python (or I'm doing something completely stupid).

 
{code:java}

>>> import pyarrow.dataset as ds
>>> ds. scalar(False) and ds.scalar(True) # <--- I expect false
<pyarrow.dataset.Expression true>
>>> ds.scalar(True) and ds.scalar(False) # this works
<pyarrow.dataset.Expression false>

>>> ds.scalar(True) or ds.scalar(False) # this works
<pyarrow.dataset.Expression true>
>>> ds.scalar(False) or ds.scalar(True) # <--- I expect true
<pyarrow.dataset.Expression false>

>>> not ds.scalar(True)   # this works                                                                                                                                                                                                  
False                                                                                                                                                                                                                       
>>> not ds.scalar(False)      <--- I expect true                                                                                                                                                                                              
False  
{code}
I tried to figure out what goes wrong here, but there are no obvious problems in the python code, same for C++ (but I didn't quite understand everything of it yet).

 

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)