LucaCappelletti94 commented on code in PR #2102:
URL: 
https://github.com/apache/datafusion-sqlparser-rs/pull/2102#discussion_r2552512333


##########
src/parser/mod.rs:
##########
@@ -7525,6 +7527,51 @@ impl<'a> Parser<'a> {
         }))
     }
 
+    /// Parse a PostgreSQL-specific [Statement::DropOperator] statement.
+    ///
+    /// ```sql
+    /// DROP OPERATOR [ IF EXISTS ] name ( { left_type | NONE } , right_type ) 
[, ...] [ CASCADE | RESTRICT ]
+    /// ```
+    ///
+    /// [PostgreSQL 
Documentation](https://www.postgresql.org/docs/current/sql-dropoperator.html)
+    pub fn parse_drop_operator(&mut self) -> Result<Statement, ParserError> {
+        let if_exists = self.parse_keywords(&[Keyword::IF, Keyword::EXISTS]);
+        let operators = self.parse_comma_separated(|p| 
p.parse_operator_signature())?;
+        let drop_behavior = self.parse_optional_drop_behavior();
+        Ok(Statement::DropOperator(DropOperator {
+            if_exists,
+            operators,
+            drop_behavior,
+        }))
+    }
+
+    /// Parse an operator signature for DROP OPERATOR
+    /// Format: name ( { left_type | NONE } , right_type )
+    fn parse_operator_signature(&mut self) -> Result<OperatorSignature, 
ParserError> {

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