You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "LucaCappelletti94 (via GitHub)" <gi...@apache.org> on 2025/04/27 15:45:56 UTC

[PR] Added support for `DROP DOMAIN` [datafusion-sqlparser-rs]

LucaCappelletti94 opened a new pull request, #1828:
URL: https://github.com/apache/datafusion-sqlparser-rs/pull/1828

   This pull request:
   * Adds support for [`DROP DOMAIN`](https://www.postgresql.org/docs/current/sql-dropdomain.html) syntax resolving issue #1827 
   * Adds tests for `DROP DOMAIN`
   
   Best,
   Luca


-- 
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-unsubscribe@datafusion.apache.org

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


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


Re: [PR] Added support for `DROP DOMAIN` [datafusion-sqlparser-rs]

Posted by "LucaCappelletti94 (via GitHub)" <gi...@apache.org>.
LucaCappelletti94 commented on code in PR #1828:
URL: https://github.com/apache/datafusion-sqlparser-rs/pull/1828#discussion_r2067152516


##########
src/ast/mod.rs:
##########
@@ -3319,6 +3319,18 @@ pub enum Statement {
         drop_behavior: Option<DropBehavior>,
     },
     /// ```sql
+    /// DROP DOMAIN
+    /// ```
+    /// See [PostgreSQL](https://www.postgresql.org/docs/current/sql-dropdomain.html)
+    ///
+    /// DROP DOMAIN [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ]
+    ///
+    DropDomain {
+        if_exists: bool,
+        name: ObjectName,
+        drop_behavior: Option<DropBehavior>,
+    },

Review Comment:
   Oki



-- 
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-unsubscribe@datafusion.apache.org

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


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


Re: [PR] Added support for `DROP DOMAIN` [datafusion-sqlparser-rs]

Posted by "iffyio (via GitHub)" <gi...@apache.org>.
iffyio merged PR #1828:
URL: https://github.com/apache/datafusion-sqlparser-rs/pull/1828


-- 
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-unsubscribe@datafusion.apache.org

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


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


Re: [PR] Added support for `DROP DOMAIN` [datafusion-sqlparser-rs]

Posted by "LucaCappelletti94 (via GitHub)" <gi...@apache.org>.
LucaCappelletti94 commented on code in PR #1828:
URL: https://github.com/apache/datafusion-sqlparser-rs/pull/1828#discussion_r2068085168


##########
src/ast/mod.rs:
##########
@@ -3319,6 +3319,18 @@ pub enum Statement {
         drop_behavior: Option<DropBehavior>,
     },
     /// ```sql
+    /// DROP DOMAIN
+    /// ```
+    /// See [PostgreSQL](https://www.postgresql.org/docs/current/sql-dropdomain.html)
+    ///
+    /// DROP DOMAIN [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ]
+    ///
+    DropDomain {
+        if_exists: bool,
+        name: ObjectName,
+        drop_behavior: Option<DropBehavior>,
+    },

Review Comment:
   Done in commit [10dab51](https://github.com/apache/datafusion-sqlparser-rs/pull/1828/commits/10dab5142da31e0fd0768318cc57b389ed6b1de2)



-- 
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-unsubscribe@datafusion.apache.org

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


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


Re: [PR] Added support for `DROP DOMAIN` [datafusion-sqlparser-rs]

Posted by "iffyio (via GitHub)" <gi...@apache.org>.
iffyio commented on code in PR #1828:
URL: https://github.com/apache/datafusion-sqlparser-rs/pull/1828#discussion_r2067148582


##########
src/ast/mod.rs:
##########
@@ -3319,6 +3319,18 @@ pub enum Statement {
         drop_behavior: Option<DropBehavior>,
     },
     /// ```sql
+    /// DROP DOMAIN
+    /// ```
+    /// See [PostgreSQL](https://www.postgresql.org/docs/current/sql-dropdomain.html)
+    ///
+    /// DROP DOMAIN [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ]
+    ///
+    DropDomain {
+        if_exists: bool,
+        name: ObjectName,
+        drop_behavior: Option<DropBehavior>,
+    },

Review Comment:
   Could we wrap the new statement in a named struct? We're looking to move over to [that pattern](https://github.com/apache/datafusion-sqlparser-rs/issues/1204) for newer statements. e.g.
   ```rust
   struct DropDomain {
       if_exist: bool 
       // ...
   }
   Statement::DropDomain(DropDomain)
   ```



-- 
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-unsubscribe@datafusion.apache.org

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


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