ntjohnson1 opened a new issue, #1483:
URL: https://github.com/apache/datafusion-python/issues/1483
**Is your feature request related to a problem or challenge? Please describe
what you are trying to do.**
```python
>>> import datafusion as dfn
>>> ctx = dfn.SessionContext()
>>> df = ctx.from_pydict({"a": [1, 2, None]})
>>> df.filter(dfn.col("a") is None).count()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<path>/lib/python3.12/site-packages/datafusion/dataframe.py", line
499, in filter
df = df.filter(ensure_expr(expr))
^^^^^^^^^^^^^^^^^
File "<path>/lib/python3.12/site-packages/datafusion/expr.py", line 250,
in ensure_expr
raise TypeError(EXPR_TYPE_ERROR)
TypeError: Use col()/column() or lit()/literal() to construct expressions
>>> df.filter(dfn.col("a") == None).count()
0
>>> df.filter(dfn.col("a").is_null()).count()
1
```
**Describe the solution you'd like**
I'd like to be able to compare against None like we can do with other scalar
types. Ideally using both `==` and `is` semantics.
**Describe alternatives you've considered**
`.is_null`
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]