Skip to content

Commit aad7744

Browse files
committed
Add test
1 parent c81c1b4 commit aad7744

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

datafusion/core/src/execution/context/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1126,7 +1126,7 @@ impl SessionContext {
11261126
.into_iter()
11271127
.map(|e| match e {
11281128
Expr::Literal(scalar) => Ok(scalar),
1129-
_ => not_impl_err!("Unsupported data type for parameter: {}", e),
1129+
_ => not_impl_err!("Unsupported parameter type: {}", e),
11301130
})
11311131
.collect::<Result<_>>()?;
11321132

datafusion/sqllogictest/test_files/prepare.slt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,10 @@ EXECUTE my_plan6(20.0);
136136
statement error Cast error: Cannot cast string 'foo' to value of Int32 type
137137
EXECUTE my_plan6('foo');
138138

139+
# TODO: support non-literal expressions
140+
statement error Unsupported parameter type
141+
EXECUTE my_plan6(10 + 20);
142+
139143
statement ok
140144
PREPARE my_plan7(INT, STRING, DOUBLE, INT, DOUBLE, STRING)
141145
AS

0 commit comments

Comments
 (0)