Skip to content

Commit

Permalink
am I going insane?
Browse files Browse the repository at this point in the history
  • Loading branch information
mpurins-coralogix committed Sep 15, 2022
1 parent 6ffda68 commit f5c0fc0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions datafusion/core/tests/sql/cast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ async fn execute_sql(sql: &str) -> Vec<RecordBatch> {
execute_to_batches(&ctx, sql).await
}

#[tokio::test]
async fn cast_failure() -> Result<()> {
let actual = execute_sql("SELECT cast(c as varchar) FROM (SELECT 1 as c)").await;
assert_eq!(&DataType::Utf8, actual[0].schema().field(0).data_type());
Ok(())
}

#[tokio::test]
async fn cast_tinyint() -> Result<()> {
let actual = execute_sql("SELECT cast(10 as tinyint)").await;
Expand Down

0 comments on commit f5c0fc0

Please sign in to comment.