From 60b3d2e983300b0682e8a20a8e2d478201246168 Mon Sep 17 00:00:00 2001 From: Orson Peters Date: Mon, 18 Sep 2023 19:54:17 +0200 Subject: [PATCH] feature-dependent fixes --- crates/polars-core/src/frame/hash_join/mod.rs | 4 +--- crates/polars-core/src/series/implementations/array.rs | 1 + crates/polars-core/src/series/implementations/mod.rs | 1 + crates/polars-core/src/series/implementations/object.rs | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/crates/polars-core/src/frame/hash_join/mod.rs b/crates/polars-core/src/frame/hash_join/mod.rs index e25ab39b025a..d700a2edbe1a 100644 --- a/crates/polars-core/src/frame/hash_join/mod.rs +++ b/crates/polars-core/src/frame/hash_join/mod.rs @@ -213,9 +213,7 @@ impl DataFrame { right_idx = slice_slice(right_idx, offset, len); } unsafe { - other.take_opt_iter_unchecked( - right_idx.iter().map(|opt_i| opt_i.map(|i| i as usize)), - ) + other.take_unchecked(&right_idx.iter().copied().collect_ca("")) } }; let (df_left, df_right) = POOL.join(materialize_left, materialize_right); diff --git a/crates/polars-core/src/series/implementations/array.rs b/crates/polars-core/src/series/implementations/array.rs index 8a561932342d..698003b873ea 100644 --- a/crates/polars-core/src/series/implementations/array.rs +++ b/crates/polars-core/src/series/implementations/array.rs @@ -4,6 +4,7 @@ use std::borrow::Cow; use super::{private, IntoSeries, SeriesTrait}; use crate::chunked_array::comparison::*; use crate::chunked_array::ops::explode::ExplodeByOffsets; +#[cfg(feature = "chunked_ids")] use crate::chunked_array::ops::take::TakeChunked; use crate::chunked_array::{AsSinglePtr, Settings}; #[cfg(feature = "algorithm_group_by")] diff --git a/crates/polars-core/src/series/implementations/mod.rs b/crates/polars-core/src/series/implementations/mod.rs index d8c033eafda4..36fac927f7dd 100644 --- a/crates/polars-core/src/series/implementations/mod.rs +++ b/crates/polars-core/src/series/implementations/mod.rs @@ -40,6 +40,7 @@ use crate::chunked_array::ops::compare_inner::{ IntoPartialEqInner, IntoPartialOrdInner, PartialEqInner, PartialOrdInner, }; use crate::chunked_array::ops::explode::ExplodeByOffsets; +#[cfg(feature = "chunked_ids")] use crate::chunked_array::ops::take::TakeChunked; use crate::chunked_array::AsSinglePtr; #[cfg(feature = "algorithm_group_by")] diff --git a/crates/polars-core/src/series/implementations/object.rs b/crates/polars-core/src/series/implementations/object.rs index cee2487421fd..c58f37159d90 100644 --- a/crates/polars-core/src/series/implementations/object.rs +++ b/crates/polars-core/src/series/implementations/object.rs @@ -5,6 +5,7 @@ use ahash::RandomState; use crate::chunked_array::object::PolarsObjectSafe; use crate::chunked_array::ops::compare_inner::{IntoPartialEqInner, PartialEqInner}; +#[cfg(feature = "chunked_ids")] use crate::chunked_array::ops::take::TakeChunked; use crate::chunked_array::Settings; #[cfg(feature = "algorithm_group_by")]