Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Commit

Permalink
Fix compilation with individual features activated (#642)
Browse files Browse the repository at this point in the history
  • Loading branch information
ritchie46 authored Nov 27, 2021
1 parent b853d95 commit 20657a2
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ compute_arithmetics = ["strength_reduce"]
compute_bitwise = []
compute_boolean = []
compute_boolean_kleene = []
compute_cast = ["lexical-core"]
compute_cast = ["lexical-core", "compute_take"]
compute_comparison = []
compute_concatenate = []
compute_contains = []
Expand Down
4 changes: 2 additions & 2 deletions src/io/avro/read/decompress.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ fn decompress_block(
Ok(false)
}
#[cfg(not(feature = "io_avro_compression"))]
Some(Compression::Deflate) => Err(ArrowError::Other(
Some(Compression::Deflate) => Err(ArrowError::InvalidArgumentError(
"The avro file is deflate-encoded but feature 'io_avro_compression' is not active."
.to_string(),
)),
#[cfg(not(feature = "io_avro_compression"))]
Some(Compression::Snappy) => Err(ArrowError::Other(
Some(Compression::Snappy) => Err(ArrowError::InvalidArgumentError(
"The avro file is snappy-encoded but feature 'io_avro_compression' is not active."
.to_string(),
)),
Expand Down
14 changes: 12 additions & 2 deletions src/util/mod.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
//! Misc utilities used in different places in the crate.
#[cfg(any(feature = "compute", feature = "io_csv_write", feature = "io_csv_read"))]
#[cfg(any(
feature = "compute",
feature = "io_csv_write",
feature = "io_csv_read",
feature = "compute_cast"
))]
mod lexical;
#[cfg(any(feature = "compute", feature = "io_csv_write", feature = "io_csv_read"))]
#[cfg(any(
feature = "compute",
feature = "io_csv_write",
feature = "io_csv_read",
feature = "compute_cast"
))]
pub use lexical::*;

#[cfg(feature = "benchmarks")]
Expand Down

0 comments on commit 20657a2

Please sign in to comment.