Skip to content

Commit 789a8e5

Browse files
alippaipaddyhoran
authored andcommitted
ARROW-6687: [Rust] [DataFusion] Add regression tests for np.nan parquet file
Closes apache#5502 from alippai/patch-2 and squashes the following commits: 136087f <Adam Lippai> ARROW-6687: Add regression tests for the new datafusion .parquet support Authored-by: Adam Lippai <adam@rigo.sk> Signed-off-by: Paddy Horan <paddyhoran@hotmail.com>
1 parent 5fec051 commit 789a8e5

2 files changed

Lines changed: 16 additions & 1 deletion

File tree

‎rust/datafusion/tests/sql.rs‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,21 @@ fn parquet_query() {
9494
assert_eq!(expected, actual);
9595
}
9696

97+
#[test]
98+
fn parquet_single_nan_schema() {
99+
let mut ctx = ExecutionContext::new();
100+
let testdata = env::var("PARQUET_TEST_DATA").expect("PARQUET_TEST_DATA not defined");
101+
ctx.register_parquet("single_nan", &format!("{}/single_nan.parquet", testdata))
102+
.unwrap();
103+
let sql = "SELECT mycol FROM single_nan";
104+
let relation = ctx.sql(&sql, 1024 * 1024).unwrap();
105+
let mut results = relation.borrow_mut();
106+
while let Some(batch) = results.next().unwrap() {
107+
assert_eq!(1, batch.num_rows());
108+
assert_eq!(1, batch.num_columns());
109+
}
110+
}
111+
97112
#[test]
98113
fn csv_count_star() {
99114
let mut ctx = ExecutionContext::new();

0 commit comments

Comments
 (0)