You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow place holders like $1 in more types of queries. (#13632)
* Allow place holders in the column list
Previously, a query like `SELECT $1;` would fail to generate a
LogicalPlan. With this change these queries are now workable. This
required creating a new LogicalPlan::validate_parametere_types that is
called from Optimizer::optimize to assert that all parameter types have
been inferred correctly.
* Remove redundant asserts
* Fix typo in comments
* Add comment explaining DataType::Null
* Move unbound placeholder error to physical-expr
Previously, these errors would occurr during optimization. Now that we
allow unbound placeholders through the optimizer they fail when creating
the physical plan instead.
* Fix expected error message
"INSERT INTO person (id, first_name, last_name) VALUES ($1, $2, $3, $4)",
572
572
"Error during planning: Placeholder $4 refers to a non existent column"
573
573
)]
574
-
#[case::placeholder_type_unresolved(
575
-
"INSERT INTO person (id, first_name, last_name) VALUES ($2, $4, $6)",
576
-
"Error during planning: Placeholder type could not be resolved. Make sure that the placeholder is bound to a concrete type, e.g. by providing parameter values."
577
-
)]
578
574
#[case::placeholder_type_unresolved(
579
575
"INSERT INTO person (id, first_name, last_name) VALUES ($id, $first_name, $last_name)",
580
576
"Error during planning: Can't parse placeholder: $id"
0 commit comments