You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/04/01 03:17:44 UTC

[GitHub] [arrow-datafusion] WinkerDu commented on a change in pull request #2108: fix df union all bug

WinkerDu commented on a change in pull request #2108:
URL: https://github.com/apache/arrow-datafusion/pull/2108#discussion_r840199054



##########
File path: datafusion/common/src/dfschema.rs
##########
@@ -281,6 +282,18 @@ impl DFSchema {
             .all(|(dffield, arrowfield)| dffield.name() == arrowfield.name())
     }
 
+    /// Check to see if fields in 2 Arrow schemas are compatible
+    pub fn check_arrow_schema_type_compatible(&self, arrow_schema: &Schema) -> bool {
+        let self_arrow_schema: Schema = self.into();
+        self_arrow_schema
+            .fields()
+            .iter()
+            .zip(arrow_schema.fields().iter())
+            .all(|(l_field, r_field)| {
+                can_cast_types(r_field.data_type(), l_field.data_type())

Review comment:
       @Dandandan OK, I'll fix it.




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