Skip to content

Commit

Permalink
fix warnings at certain feature combinations
Browse files Browse the repository at this point in the history
  • Loading branch information
ritchie46 committed Nov 18, 2021
1 parent 3f7d7cc commit 37e1807
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions polars/polars-core/src/datatypes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ where
}

impl<'a> AnyValue<'a> {
#[cfg(any(feature = "dtype-date", feature = "dtype-datetime"))]
pub(crate) fn into_date(self) -> Self {
match self {
#[cfg(feature = "dtype-date")]
Expand Down
5 changes: 5 additions & 0 deletions polars/polars-core/src/series/into.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
use crate::prelude::*;
#[cfg(any(
feature = "dtype-datetime",
feature = "dtype-date",
feature = "dtype-time"
))]
use polars_arrow::compute::cast::cast;

impl Series {
Expand Down
1 change: 1 addition & 0 deletions polars/polars-core/src/series/series_trait.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ use crate::chunked_array::ChunkIdIter;
#[cfg(feature = "object")]
use std::any::Any;
use std::borrow::Cow;
#[cfg(feature = "temporal")]
use std::ops::Deref;
use std::sync::Arc;

Expand Down
1 change: 1 addition & 0 deletions polars/polars-io/src/csv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ use crate::utils::resolve_homedir;
use crate::{PhysicalIoExpr, ScanAggregation, SerReader, SerWriter};
pub use arrow::io::csv::write;
use polars_core::prelude::*;
#[cfg(feature = "temporal")]
use std::borrow::Cow;
use std::fs::File;
use std::io::Write;
Expand Down
6 changes: 6 additions & 0 deletions polars/polars-lazy/src/physical_plan/executors/scan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use crate::logical_plan::IpcOptions;
use crate::utils::try_path_to_str;
use polars_io::prelude::*;
use polars_io::{csv::CsvEncoding, ScanAggregation};
#[cfg(any(feature = "ipc", feature = "parquet"))]
use std::fs::File;
use std::mem;
use std::path::Path;
Expand All @@ -23,11 +24,16 @@ fn cache_hit(
(cache_key, cached)
}

#[cfg(any(feature = "ipc", feature = "parquet"))]
type Projection = Option<Vec<usize>>;
#[cfg(any(feature = "ipc", feature = "parquet"))]
type StopNRows = Option<usize>;
#[cfg(any(feature = "ipc", feature = "parquet"))]
type Aggregation<'a> = Option<&'a [ScanAggregation]>;
#[cfg(any(feature = "ipc", feature = "parquet"))]
type Predicate = Option<Arc<dyn PhysicalIoExpr>>;

#[cfg(any(feature = "ipc", feature = "parquet"))]
fn prepare_scan_args<'a>(
path: &Path,
predicate: &Option<Arc<dyn PhysicalExpr>>,
Expand Down

0 comments on commit 37e1807

Please sign in to comment.