sunchao commented on a change in pull request #9047:
URL: https://github.com/apache/arrow/pull/9047#discussion_r550799082
##########
File path: rust/arrow/src/compute/kernels/cast.rs
##########
@@ -532,6 +533,7 @@ pub fn cast(array: &ArrayRef, to_type: &DataType) ->
Result<ArrayRef> {
(Int64, Int32) => cast_numeric_arrays::<Int64Type, Int32Type>(array),
(Int64, Float32) => cast_numeric_arrays::<Int64Type,
Float32Type>(array),
(Int64, Float64) => cast_numeric_arrays::<Int64Type,
Float64Type>(array),
+ (Int64, Decimal(p, s)) => int64_to_decimal_cast(array, *p, *s),
Review comment:
yeah this looks a little weird - I'm thinking that instead of handling
this in the compute kernel, the parquet/arrow reader should just understand the
conversion from parquet's decimal type to that of arrow's and generate decimal
arrow directly.
----------------------------------------------------------------
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]