lovasoa commented on code in PR #1490:
URL:
https://github.com/apache/datafusion-sqlparser-rs/pull/1490#discussion_r1826574252
##########
tests/sqlparser_common.rs:
##########
@@ -9730,6 +9734,41 @@ fn parse_call() {
);
}
+#[test]
+fn parse_execute_stored_procedure() {
+ let expected = Statement::Execute {
+ name: ObjectName(vec![
+ Ident {
+ value: "my_schema".to_string(),
+ quote_style: None,
+ },
+ Ident {
+ value: "my_stored_procedure".to_string(),
+ quote_style: None,
+ },
+ ]),
+ parameters: vec![
+ Expr::Value(Value::NationalStringLiteral("param1".to_string())),
+ Expr::Value(Value::NationalStringLiteral("param2".to_string())),
+ ],
+ has_parentheses: false,
+ using: vec![],
+ };
+ assert_eq!(
+ // Microsoft SQL Server does not use parentheses around arguments for
EXECUTE
+ ms_and_generic()
+ .verified_stmt("EXECUTE my_schema.my_stored_procedure N'param1',
N'param2'"),
+ expected
+ );
+ assert_eq!(
+ ms_and_generic().one_statement_parses_to(
Review Comment:
I think we already discussed that. I am against getting the syntax, for the
reasons we have discussed above.
I think this PR is ready for merging.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]