Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
jonahgao committed Nov 4, 2024
1 parent c81c1b4 commit aad7744
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion datafusion/core/src/execution/context/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1126,7 +1126,7 @@ impl SessionContext {
.into_iter()
.map(|e| match e {
Expr::Literal(scalar) => Ok(scalar),
_ => not_impl_err!("Unsupported data type for parameter: {}", e),
_ => not_impl_err!("Unsupported parameter type: {}", e),
})
.collect::<Result<_>>()?;

Expand Down
4 changes: 4 additions & 0 deletions datafusion/sqllogictest/test_files/prepare.slt
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,10 @@ EXECUTE my_plan6(20.0);
statement error Cast error: Cannot cast string 'foo' to value of Int32 type
EXECUTE my_plan6('foo');

# TODO: support non-literal expressions
statement error Unsupported parameter type
EXECUTE my_plan6(10 + 20);

statement ok
PREPARE my_plan7(INT, STRING, DOUBLE, INT, DOUBLE, STRING)
AS
Expand Down

0 comments on commit aad7744

Please sign in to comment.