fmguerreiro commented on code in PR #2217:
URL: 
https://github.com/apache/datafusion-sqlparser-rs/pull/2217#discussion_r2928411640


##########
src/ast/ddl.rs:
##########
@@ -3466,6 +3466,28 @@ impl fmt::Display for CreateDomain {
     }
 }
 
+/// The return type of a `CREATE FUNCTION` statement.
+///
+/// 
[PostgreSQL](https://www.postgresql.org/docs/current/sql-createfunction.html)
+#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)]
+#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
+#[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
+pub enum FunctionReturnType {
+    /// `RETURNS <type>`
+    DataType(DataType),
+    /// `RETURNS SETOF <type>`

Review Comment:
   e9a35be



##########
src/ast/spans.rs:
##########
@@ -632,33 +657,6 @@ impl Spanned for TableConstraint {
     }
 }
 
-impl Spanned for PartitionBoundValue {

Review Comment:
   20d842f



##########
src/parser/mod.rs:
##########
@@ -5883,6 +5883,17 @@ impl<'a> Parser<'a> {
         })
     }
 
+    /// Parse a [`FunctionReturnType`] after the `RETURNS` keyword.
+    ///
+    /// Handles `RETURNS SETOF <type>` and plain `RETURNS <type>`.

Review Comment:
   e9a35be



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