Commit cf46050
authored
[PyArrow] Filter Pushdown of IS IN now uses the dedicated pyarrow.compure.Expression.isin method (#335)
Continued from #73
Null handling seems to work fine, afaics. We are using
[`Expression.isin()`](https://arrow.apache.org/docs/python/generated/pyarrow.dataset.Expression.html#pyarrow.dataset.Expression.isin),
which does not have a `skipp_nulls` kwarg. It uses the same default
semantics as
[`pyarrow.compute.is_in`](https://arrow.apache.org/docs/python/generated/pyarrow.compute.is_in.html#pyarrow.compute.is_in),
which is `skip_nulls = False`. This is not exactly the same as duckdb's
semantics, because DuckDB will not return NULL values even if NULL is in
the IN list:
```
D select * from VALUES(1), (2), (3), (NULL) as t(myint) where myint in (2, NULL);
┌───────┐
│ myint │
│ int32 │
├───────┤
│ 2 │
└───────┘
```
But this is no big deal. We might let more rows through than is needed,
but duckdb will filter them out anyway. Also see the test.2 files changed
Lines changed: 39 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
163 | 172 | | |
164 | 173 | | |
165 | 174 | | |
| |||
282 | 291 | | |
283 | 292 | | |
284 | 293 | | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
296 | 297 | | |
297 | 298 | | |
298 | 299 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
921 | 921 | | |
922 | 922 | | |
923 | 923 | | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
924 | 951 | | |
925 | 952 | | |
926 | 953 | | |
| |||
0 commit comments