iffyio commented on code in PR #1965:
URL: 
https://github.com/apache/datafusion-sqlparser-rs/pull/1965#discussion_r2251829588


##########
src/ast/ddl.rs:
##########
@@ -2524,3 +2524,31 @@ impl fmt::Display for CreateConnector {
         Ok(())
     }
 }
+
+/// `RenameTableNameKind` is the kind used in `ALTER TABLE _ RENAME TO/AS _`.
+/// Used in MySQL.

Review Comment:
   ```suggestion
   /// `RenameTableNameKind` is the kind used in an `ALTER TABLE _ RENAME` 
statement.
   ```



##########
src/ast/ddl.rs:
##########
@@ -2524,3 +2524,31 @@ impl fmt::Display for CreateConnector {
         Ok(())
     }
 }
+
+/// `RenameTableNameKind` is the kind used in `ALTER TABLE _ RENAME TO/AS _`.
+/// Used in MySQL.
+#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)]
+#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
+#[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
+pub enum RenameTableNameKind {
+    As(ObjectName),

Review Comment:
   Can we add a link to the mysql docs, flagging that its the one that supports 
the `AS` syntax?



##########
src/ast/ddl.rs:
##########
@@ -2524,3 +2524,31 @@ impl fmt::Display for CreateConnector {
         Ok(())
     }
 }
+
+/// `RenameTableNameKind` is the kind used in `ALTER TABLE _ RENAME TO/AS _`.
+/// Used in MySQL.
+#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)]
+#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
+#[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
+pub enum RenameTableNameKind {
+    As(ObjectName),
+    To(ObjectName),

Review Comment:
   ```suggestion
       /// `ALTER TABLE foo RENAME as bar`
       As(ObjectName),
       /// `ALTER TABLE foo RENAME to bar`
       To(ObjectName),
   ```



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