alamb commented on code in PR #15239:
URL: https://github.com/apache/datafusion/pull/15239#discussion_r1999161222


##########
datafusion/common/src/dfschema.rs:
##########
@@ -563,29 +563,6 @@ 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(

Review Comment:
   Since this is a public function, can you please put it back and mark it 
deprecated instead to follow the deprecation guidelines: 
https://datafusion.apache.org/contributor-guide/api-health.html#deprecation-guidelines
 
   



##########
datafusion/common/src/dfschema.rs:
##########
@@ -605,25 +582,49 @@ impl DFSchema {
     }
 
     /// Returns true if the two schemas have the same qualified named
-    /// fields with the same data types. Returns false otherwise.
+    /// fields with the compatible data types. Returns false otherwise.
     ///
     /// This is a specialized version of Eq that ignores differences
     /// in nullability and metadata.
     ///
     /// Use [DFSchema]::logically_equivalent_names_and_types for a weaker
     /// logical type checking, which for example would consider a dictionary
     /// encoded UTF8 array to be equivalent to a plain UTF8 array.
-    pub fn equivalent_names_and_types(&self, other: &Self) -> bool {
+    pub fn equivalent_names_and_types(&self, other: &Self) -> Result<()> {

Review Comment:
   likewise, to ease upgrade, can you please put the old function signature 
back and mark it deprecated and put the new signature as a new function? 
Perhaps something like
   
   ```rust
      #[deprecated(since = "47.0.0", note = "Use 
has_equivalent_names_and_types`  instead")]
       pub fn equivalent_names_and_types(&self, other: &Self) -> bool {
         self.has_equivalent_names_and_types.is_err()
       }
   
       pub fn has_equivalent_names_and_types(&self, other: &Self) -> Result<()> 
{ 
   ...
       }
   ```



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