Skip to content

Commit

Permalink
Fix error message typos with Parquet compression (#6918)
Browse files Browse the repository at this point in the history
  • Loading branch information
orf authored Dec 29, 2024
1 parent 63899b7 commit 191a9ec
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions parquet/src/basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -426,14 +426,19 @@ fn split_compression_string(str_setting: &str) -> Result<(&str, Option<u32>), Pa

fn check_level_is_none(level: &Option<u32>) -> Result<(), ParquetError> {
if level.is_some() {
return Err(ParquetError::General("level is not support".to_string()));
return Err(ParquetError::General(
"compression level is not supported".to_string(),
));
}

Ok(())
}

fn require_level(codec: &str, level: Option<u32>) -> Result<u32, ParquetError> {
level.ok_or(ParquetError::General(format!("{} require level", codec)))
level.ok_or(ParquetError::General(format!(
"{} requires a compression level",
codec
)))
}

impl FromStr for Compression {
Expand Down

0 comments on commit 191a9ec

Please sign in to comment.