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

Commit

Permalink
Removed test
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgecarleitao committed Jan 13, 2022
1 parent c1cb8f5 commit 44959e1
Showing 1 changed file with 0 additions and 51 deletions.
51 changes: 0 additions & 51 deletions src/io/parquet/read/schema/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,54 +83,3 @@ fn parse_key_value_metadata(
None => None,
}
}

#[cfg(test)]
mod tests {
use std::fs::File;

use parquet2::read::read_metadata;

use crate::datatypes::Schema;
use crate::error::Result;

use super::read_schema_from_metadata;

fn read_schema(path: &str) -> Result<Option<Schema>> {
let mut file = File::open(path).unwrap();

let metadata = read_metadata(&mut file)?;
let keys = metadata.key_value_metadata();
read_schema_from_metadata(keys)
}

#[test]
fn test_basic() -> Result<()> {
if std::env::var("ARROW2_IGNORE_PARQUET").is_ok() {
return Ok(());
}
let schema = read_schema("fixtures/pyarrow3/v1/basic_nullable_10.parquet")?;
let names = schema
.unwrap()
.fields
.iter()
.map(|x| x.name.clone())
.collect::<Vec<_>>();
assert_eq!(
names,
vec![
"int64",
"float64",
"string",
"bool",
"date",
"uint32",
"string_large",
"decimal_9",
"decimal_18",
"decimal_26",
"timestamp_us"
]
);
Ok(())
}
}

0 comments on commit 44959e1

Please sign in to comment.