Skip to content

Commit

Permalink
Fix: datafusion optimizer test
Browse files Browse the repository at this point in the history
  • Loading branch information
alamb committed Oct 4, 2022
1 parent 45fc415 commit a33a41a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions datafusion/optimizer/tests/integration-test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,15 @@ fn case_when() -> Result<()> {
Ok(())
}

#[test]
fn case_when_aggregate() -> Result<()> {
let sql = "SELECT col_utf8, SUM(CASE WHEN col_int32 > 0 THEN 1 ELSE 0 END) AS n FROM test GROUP BY col_utf8";
let plan = test_sql(sql)?;
let expected = "";
assert_eq!(expected, format!("{:?}", plan));
Ok(())
}

#[test]
fn unsigned_target_type() -> Result<()> {
let sql = "SELECT * FROM test WHERE col_uint32 > 0";
Expand Down

0 comments on commit a33a41a

Please sign in to comment.