apache / apache/arrow

pyarrow got wrong result when null

Open
#45,337 0 comments 0 reactions 0 assignees View on GitHub
Component: Python Type: bug
Dominant language
C++
Stars
17.1k
Forks
4.3k
Avg merge
3d 13h
Merged PRs (30d)
88

Description

### Describe the bug, including details regarding any error messages, version, and platform.

when pandas has a null column,compare will get a False,
```
import duckdb as dd
df=dd.sql("select null as id").df()
df['id']>1
```
0 False
Name: id, dtype: bool

but change to arrow, will get NA, how to get False?
```
import pyarrow as pa
import pandas as pd
df2=pa.Table.from_pandas(df).to_pandas(types_mapper=pd.ArrowDtype,use_threads=True)
df2['id']>1
```
0
Name: id, dtype: bool[pyarrow]

### Component(s)

Python

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.