Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.20.6 regression from 0.20.5: list.set_intersection() panics for columns of type pl.List[Binary] #14144

Closed
2 tasks done
sslivkoff opened this issue Feb 1, 2024 · 0 comments · Fixed by #14152
Closed
2 tasks done
Assignees
Labels
bug Something isn't working P-high Priority: high python Related to Python Polars regression Issue introduced by a new release

Comments

@sslivkoff
Copy link

Checks

  • I have checked that this issue has not already been reported.
  • I have confirmed this bug exists on the latest version of Polars.

Reproducible example

This code works on 0.20.5 but breaks on 0.20.6:

import polars as pl


df = pl.DataFrame(
    {
        'before': [[b'123', b'456'], [b'123', b'456'], [b'123', b'456']],
        'after': [[b'123', b'789'], [b'123', b'789'], [b'123', b'789']],
    }
)

df.select(pl.col.before.list.set_intersection(pl.col.after))

Log output

---------------------------------------------------------------------------
PanicException                            Traceback (most recent call last)
Cell In[2], line 11
      1 import polars as pl
      4 df = pl.DataFrame(
      5     {
      6         'before': [[b'123', b'456'], [b'123', b'456'], [b'123', b'456']],
      7         'after': [[b'123', b'789'], [b'123', b'789'], [b'123', b'789']],
      8     }
      9 )
---> 11 df.select(pl.col.before.list.set_intersection(pl.col.after))

File ~/.local/lib/python3.10/site-packages/polars/dataframe/frame.py:8144, in DataFrame.select(self, *exprs, **named_exprs)
   8044 def select(
   8045     self, *exprs: IntoExpr | Iterable[IntoExpr], **named_exprs: IntoExpr
   8046 ) -> DataFrame:
   8047     """
   8048     Select columns from this DataFrame.
   8049 
   (...)
   8142     └───────────┘
   8143     """
-> 8144     return self.lazy().select(*exprs, **named_exprs).collect(_eager=True)

File ~/.local/lib/python3.10/site-packages/polars/lazyframe/frame.py:1940, in LazyFrame.collect(self, type_coercion, predicate_pushdown, projection_pushdown, simplify_expression, slice_pushdown, comm_subplan_elim, comm_subexpr_elim, no_optimization, streaming, background, _eager)
   1937 if background:
   1938     return InProcessQuery(ldf.collect_concurrently())
-> 1940 return wrap_df(ldf.collect())

PanicException: not implemented for dtype Binary



### Issue description

it worked before on 0.20.5, now it doesn't

### Expected behavior

works same as 0.20.6

### Installed versions

0.20.5 --> 0.20.6
@sslivkoff sslivkoff added bug Something isn't working needs triage Awaiting prioritization by a maintainer python Related to Python Polars labels Feb 1, 2024
@reswqa reswqa added P-high Priority: high and removed needs triage Awaiting prioritization by a maintainer labels Feb 1, 2024
@reswqa reswqa self-assigned this Feb 1, 2024
@reswqa reswqa added the regression Issue introduced by a new release label Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P-high Priority: high python Related to Python Polars regression Issue introduced by a new release
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants