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

Commit

Permalink
Improved eror message for missing feature in compressed parquet.
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgecarleitao committed Nov 24, 2021
1 parent e68af5c commit 0743ade
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/io/parquet/mod.rs
Expand Up @@ -8,7 +8,15 @@ const ARROW_SCHEMA_META_KEY: &str = "ARROW:schema";

impl From<parquet2::error::ParquetError> for ArrowError {
fn from(error: parquet2::error::ParquetError) -> Self {
ArrowError::External("".to_string(), Box::new(error))
match error {
parquet2::error::ParquetError::FeatureNotActive(_, _) => {
let message = "Failed to read a compressed parquet file. \
Use the cargo feature \"io_parquet_compression\" to read compressed parquet files."
.to_string();
ArrowError::ExternalFormat(message)
}
_ => ArrowError::ExternalFormat(error.to_string()),
}
}
}

Expand Down

0 comments on commit 0743ade

Please sign in to comment.