Skip to content

Commit

Permalink
fix(rust): Error message of list unique should not display inner type (
Browse files Browse the repository at this point in the history
  • Loading branch information
reswqa authored Aug 27, 2023
1 parent 6e59512 commit c50c1e6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/polars-core/src/series/implementations/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ impl SeriesTrait for SeriesWrap<ListChunked> {
#[cfg(feature = "group_by_list")]
fn unique(&self) -> PolarsResult<Series> {
if !self.inner_dtype().is_numeric() {
polars_bail!(opq = unique, self.inner_dtype());
polars_bail!(opq = unique, self.dtype());
}
// this can be called in aggregation, so this fast path can be worth a lot
if self.len() < 2 {
Expand All @@ -211,7 +211,7 @@ impl SeriesTrait for SeriesWrap<ListChunked> {
#[cfg(feature = "group_by_list")]
fn n_unique(&self) -> PolarsResult<usize> {
if !self.inner_dtype().is_numeric() {
polars_bail!(opq = n_unique, self.inner_dtype());
polars_bail!(opq = n_unique, self.dtype());
}
// this can be called in aggregation, so this fast path can be worth a lot
match self.len() {
Expand All @@ -228,7 +228,7 @@ impl SeriesTrait for SeriesWrap<ListChunked> {
#[cfg(feature = "group_by_list")]
fn arg_unique(&self) -> PolarsResult<IdxCa> {
if !self.inner_dtype().is_numeric() {
polars_bail!(opq = arg_unique, self.inner_dtype());
polars_bail!(opq = arg_unique, self.dtype());
}
// this can be called in aggregation, so this fast path can be worth a lot
if self.len() == 1 {
Expand Down

0 comments on commit c50c1e6

Please sign in to comment.