aharpervc commented on code in PR #1839:
URL: 
https://github.com/apache/datafusion-sqlparser-rs/pull/1839#discussion_r2087214184


##########
src/ast/mod.rs:
##########
@@ -8660,6 +8660,28 @@ pub enum CreateFunctionBody {
     ///
     /// [PostgreSQL]: 
https://www.postgresql.org/docs/current/sql-createfunction.html
     Return(Expr),
+
+    /// Function body expression using the 'AS RETURN' keywords
+    ///
+    /// Example:
+    /// ```sql
+    /// CREATE FUNCTION myfunc(a INT, b INT)
+    /// RETURNS TABLE
+    /// AS RETURN (SELECT a + b AS sum);
+    /// ```
+    ///
+    /// [MsSql]: 
https://learn.microsoft.com/en-us/sql/t-sql/statements/create-function-transact-sql
+    AsReturnSubquery(Expr),
+
+    /// Function body expression using the 'AS RETURN' keywords, with an 
un-parenthesized SELECT query
+    ///
+    /// Example:
+    /// ```sql
+    /// CREATE FUNCTION myfunc(a INT, b INT)
+    /// RETURNS TABLE
+    /// AS RETURN SELECT a + b AS sum;
+    /// ```
+    AsReturnSelect(Select),

Review Comment:
   Done 👍 



-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to