man-group / ArcticDB

ArcticDB is a high performance, serverless DataFrame database built for the Python Data Science ecosystem.
http://arcticdb.io
Other
1.51k stars 93 forks source link

Bugfix 1970: Give helpful error message if and/or/not operators are provided in QueryBuilder operations #1976

Closed alexowens90 closed 2 weeks ago

alexowens90 commented 2 weeks ago

Reference Issues/PRs

Fixes #1970

alexowens90 commented 2 weeks ago

How does this affect truthiness tests like,

q = QueryBuilder() if some_test() else None
if q:
  # foo
else:
  # bar

It doesn't, the __bool__ method has been implemented on the ExpressionNode class (which is what is returned by q[col] provided col is a string), not on the QueryBuilder class itself