iffyio commented on code in PR #2217:
URL:
https://github.com/apache/datafusion-sqlparser-rs/pull/2217#discussion_r2832162422
##########
src/ast/spans.rs:
##########
@@ -632,33 +657,6 @@ impl Spanned for TableConstraint {
}
}
-impl Spanned for PartitionBoundValue {
Review Comment:
is there any changes in this diff (if not can we revert it)?
##########
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:
```suggestion
```
##########
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:
Can we instead move the link to the postgres docs here? since the enum
itself applies to all dialects, whereas only this variant is pg specific
--
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]