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 2020/10/08 12:24:51 UTC

[GitHub] [arrow] alamb opened a new pull request #8399: ARROW-10235: [Rust][DataFusion] Improve documentation for type coercion

alamb opened a new pull request #8399:
URL: https://github.com/apache/arrow/pull/8399


   The code / comments for type coercion are a little confusing and don't make the distinction between coercion and casting clear – this PR attempts to clarify the intent, channeling the information from @jorgecarleitao  here: https://github.com/apache/arrow/pull/8340#discussion_r501257096


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [arrow] jorgecarleitao closed pull request #8399: ARROW-10235: [Rust][DataFusion] Improve documentation for type coercion

Posted by GitBox <gi...@apache.org>.
jorgecarleitao closed pull request #8399:
URL: https://github.com/apache/arrow/pull/8399


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [arrow] github-actions[bot] commented on pull request #8399: ARROW-10235: [Rust][DataFusion] Improve documentation for type coercion

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #8399:
URL: https://github.com/apache/arrow/pull/8399#issuecomment-705537789


   https://issues.apache.org/jira/browse/ARROW-10235


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [arrow] jorgecarleitao commented on a change in pull request #8399: ARROW-10235: [Rust][DataFusion] Improve documentation for type coercion

Posted by GitBox <gi...@apache.org>.
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:
users@infra.apache.org



[GitHub] [arrow] jorgecarleitao closed pull request #8399: ARROW-10235: [Rust][DataFusion] Improve documentation for type coercion

Posted by GitBox <gi...@apache.org>.
jorgecarleitao closed pull request #8399:
URL: https://github.com/apache/arrow/pull/8399


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [arrow] jorgecarleitao commented on a change in pull request #8399: ARROW-10235: [Rust][DataFusion] Improve documentation for type coercion

Posted by GitBox <gi...@apache.org>.
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:
users@infra.apache.org



[GitHub] [arrow] github-actions[bot] commented on pull request #8399: ARROW-10235: [Rust][DataFusion] Improve documentation for type coercion

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #8399:
URL: https://github.com/apache/arrow/pull/8399#issuecomment-705537789


   https://issues.apache.org/jira/browse/ARROW-10235


----------------------------------------------------------------
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:
users@infra.apache.org