jayzhan211 commented on code in PR #9595:
URL: https://github.com/apache/arrow-datafusion/pull/9595#discussion_r1530288263


##########
datafusion/common/src/dfschema.rs:
##########
@@ -119,74 +120,113 @@ impl DFSchema {
     /// Creates an empty `DFSchema`
     pub fn empty() -> Self {
         Self {
-            fields: vec![],
-            metadata: HashMap::new(),
+            inner: Arc::new(Schema::new([])),
+            field_qualifiers: vec![],
             functional_dependencies: FunctionalDependencies::empty(),
         }
     }
 
-    /// Create a new `DFSchema`
+    /// Create a new `DFSchema` from an Arrow schema
     pub fn new_with_metadata(
-        fields: Vec<DFField>,
+        fields: Vec<Field>,
         metadata: HashMap<String, String>,
+    ) -> Self {
+        let field_count = fields.len();
+        let schema = Arc::new(Schema::new_with_metadata(fields, metadata));
+        Self {
+            inner: schema,
+            field_qualifiers: vec![None; field_count],
+            functional_dependencies: FunctionalDependencies::empty(),
+        }
+    }
+
+    /// Create a `DFSchema` from an Arrow schema and a given qualifier
+    ///
+    /// To create a schema from an Arrow schema without a qualifier, use

Review Comment:
   It seems qualifier is provided



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

Reply via email to