You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "viirya (via GitHub)" <gi...@apache.org> on 2023/04/22 20:57:43 UTC

[GitHub] [arrow-datafusion] viirya commented on a diff in pull request #6096: Support DROP SCHEMA statements

viirya commented on code in PR #6096:
URL: https://github.com/apache/arrow-datafusion/pull/6096#discussion_r1174462342


##########
datafusion/expr/src/logical_plan/plan.rs:
##########
@@ -1223,6 +1237,19 @@ pub struct DropTable {
     pub schema: DFSchemaRef,
 }
 
+/// Drops a schema
+#[derive(Clone, PartialEq, Eq, Hash)]
+pub struct DropSchema {
+    /// The table name

Review Comment:
   ```suggestion
       /// The schema name
   ```



##########
datafusion/expr/src/logical_plan/plan.rs:
##########
@@ -1223,6 +1237,19 @@ pub struct DropTable {
     pub schema: DFSchemaRef,
 }
 
+/// Drops a schema
+#[derive(Clone, PartialEq, Eq, Hash)]
+pub struct DropSchema {

Review Comment:
   Is this a pair with `CreateCatalogSchema`? If so, the name looks inconsistent.



##########
datafusion/common/src/table_reference.rs:
##########
@@ -450,3 +450,39 @@ mod tests {
         );
     }
 }
+
+#[derive(Debug, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)]
+pub enum SchemaReference<'a> {
+    Bare {
+        schema: Cow<'a, str>,
+    },
+    Full {
+        schema: Cow<'a, str>,
+        catalog: Cow<'a, str>,
+    },
+}
+
+pub type OwnedSchemaReference = SchemaReference<'static>;

Review Comment:
   Maybe we can also use this in `CreateCatalogSchema`?



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

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