Skip to content

Commit

Permalink
updating unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Jiayu Liu committed May 24, 2021
1 parent 7fd6a49 commit 2355533
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion datafusion/src/physical_plan/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ fn create_built_in_window_expr(
Ok(Arc::new(LastValue::new(arg, name, data_type)))
}
_ => Err(DataFusionError::NotImplemented(format!(
"window function with {:?} not yet implemented",
"Window function with {:?} not yet implemented",
fun
))),
}
Expand Down
15 changes: 9 additions & 6 deletions datafusion/tests/sql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -807,15 +807,18 @@ async fn csv_query_window_with_empty_over() -> Result<()> {
avg(c3) over (), \
count(c3) over (), \
max(c3) over (), \
min(c3) over () \
min(c3) over (), \
first_value(c3) over (), \
last_value(c3) over (), \
nth_value(c3, 2) over ()
from aggregate_test_100 limit 5";
let actual = execute(&mut ctx, sql).await;
let expected = vec![
vec!["2", "781", "7.81", "100", "125", "-117"],
vec!["5", "781", "7.81", "100", "125", "-117"],
vec!["1", "781", "7.81", "100", "125", "-117"],
vec!["1", "781", "7.81", "100", "125", "-117"],
vec!["5", "781", "7.81", "100", "125", "-117"],
vec!["2", "781", "7.81", "100", "125", "-117", "1", "30", "-40"],
vec!["5", "781", "7.81", "100", "125", "-117", "1", "30", "-40"],
vec!["1", "781", "7.81", "100", "125", "-117", "1", "30", "-40"],
vec!["1", "781", "7.81", "100", "125", "-117", "1", "30", "-40"],
vec!["5", "781", "7.81", "100", "125", "-117", "1", "30", "-40"],
];
assert_eq!(expected, actual);
Ok(())
Expand Down

0 comments on commit 2355533

Please sign in to comment.