You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "izveigor (via GitHub)" <gi...@apache.org> on 2023/06/06 11:13:14 UTC

[GitHub] [arrow-datafusion] izveigor opened a new issue, #6558: Cast between array elements

izveigor opened a new issue, #6558:
URL: https://github.com/apache/arrow-datafusion/issues/6558

   ### Is your feature request related to a problem or challenge?
   
   Arter Pull Request: https://github.com/apache/arrow-datafusion/pull/6384, In `arrow-datafusion` casting between arrays elements stopped working. The feature could be of great help when working with different types of data.
   
   ### Describe the solution you'd like
   
   All rules should be simillar to the `cast` function in `arrow-rs` (See https://docs.rs/arrow/latest/arrow/compute/kernels/cast/index.html)
   
   For example, if we create new array with `Int32Type` and `Int64Type` should return `Int64Array`.
   ```
   select make_array(Int32(1), Int64(2));
   ----
   Int64(1), Int64(2)
   ```
   
   ### Describe alternatives you've considered
   
   _No response_
   
   ### Additional context
   
   Simillar Issues:
   https://github.com/apache/arrow-datafusion/issues/6119
   https://github.com/apache/arrow-datafusion/issues/6075
   
   Simillar PR:
   https://github.com/apache/arrow-datafusion/pull/6384
   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-datafusion] alamb closed issue #6558: Cast between array elements

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb closed issue #6558: Cast between array elements
URL: https://github.com/apache/arrow-datafusion/issues/6558


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


[GitHub] [arrow-datafusion] jayzhan211 commented on issue #6558: Cast between array elements

Posted by "jayzhan211 (via GitHub)" <gi...@apache.org>.
jayzhan211 commented on issue #6558:
URL: https://github.com/apache/arrow-datafusion/issues/6558#issuecomment-1581794268

   How to determine the final data type? Can with have a data_type argument in make_array(array, target_data_type) to check whether the elements are all possible to cast to target_data_type?


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


[GitHub] [arrow-datafusion] jayzhan211 commented on issue #6558: Cast between array elements

Posted by "jayzhan211 (via GitHub)" <gi...@apache.org>.
jayzhan211 commented on issue #6558:
URL: https://github.com/apache/arrow-datafusion/issues/6558#issuecomment-1583929014

   I will take this


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


[GitHub] [arrow-datafusion] izveigor commented on issue #6558: Cast between array elements

Posted by "izveigor (via GitHub)" <gi...@apache.org>.
izveigor commented on issue #6558:
URL: https://github.com/apache/arrow-datafusion/issues/6558#issuecomment-1583061315

   @jayzhan211 `arrow-datafusion` has rules for data type coercion (See https://github.com/apache/arrow-datafusion/blob/main/datafusion/expr/src/type_coercion/binary.rs)
   For your instance,  the result should be `float` data type (because `Int` -> `UInt` and `UInt` -> `Float`)


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