jorgecarleitao commented on a change in pull request #8399:
URL: https://github.com/apache/arrow/pull/8399#discussion_r501756230



##########
File path: rust/datafusion/src/physical_plan/type_coercion.rs
##########
@@ -16,6 +16,18 @@
 // under the License.
 
 //! Type coercion rules for functions with multiple valid signatures
+//!
+//! Coercion is performed automatically by DataFusion when the types
+//! of arguments passed to a function do not exacty match the types
+//! required by that function. In this case, DataFuson will attempt to
+//! *coerce* the arguments to types accepted by the function by
+//! inserting CAST operations.
+//!
+//! CAST operations added by coercion are lossless and never discard
+//! information. For example coercion from i32 -> i64 might be
+//! performed because all valid i32 values can be represented using an
+//! i64. However, i64 -> i32 is never performed as there are i64

Review comment:
       ```suggestion
   //! i64. However, i64 -> i32 requires users to explicitly cast the array as 
there are i64
   ```

##########
File path: rust/datafusion/src/physical_plan/type_coercion.rs
##########
@@ -16,6 +16,18 @@
 // under the License.
 
 //! Type coercion rules for functions with multiple valid signatures
+//!
+//! Coercion is performed automatically by DataFusion when the types
+//! of arguments passed to a function do not exacty match the types
+//! required by that function. In this case, DataFuson will attempt to

Review comment:
       ```suggestion
   //! required by that function. In this case, DataFusion will attempt to
   ```




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to