iffyio commented on code in PR #1490:
URL: 
https://github.com/apache/datafusion-sqlparser-rs/pull/1490#discussion_r1826563723


##########
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:
   its not rare that we get PRs fixing regressions in specific dialects after 
some code change accidentally dropped support for a feature that the dialect 
(likely accidentally) relied on - even though the all tests passed at the time 
of the change. I think if we are confident that this specific feature should 
remain mssql specific, then we can also gate the behavior in the parser, 
otherwise I think we're opening up for regressions (and in this case, one that 
is trivially avoidable).
   



-- 
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]

Reply via email to