Dandandan commented on code in PR #5328:
URL: https://github.com/apache/arrow-datafusion/pull/5328#discussion_r1111652870


##########
datafusion/common/src/dfschema.rs:
##########
@@ -314,6 +329,32 @@ impl DFSchema {
         }
     }
 
+    /// Find if the field exists with the given name
+    pub fn has_column_with_unqualified_name(&self, name: &str) -> bool {
+        let matches = self.fields_with_unqualified_name(name);
+        match matches.len() {
+            1 => true,
+            _ => false,
+        }
+    }
+
+    /// Find if the field exists with the given qualified name
+    pub fn has_column_with_qualified_name(&self, qualifier: &str, name: &str) 
-> bool {
+        let matches = self.fields_with_qualified_name(qualifier, name);
+        match matches.len() {
+            1 => true,
+            _ => false,
+        }

Review Comment:
   ```suggestion
   matches.len() == 1 
   ```



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