tustvold commented on PR #6208:
URL: https://github.com/apache/arrow-rs/pull/6208#issuecomment-2275525693
> punt on a larger refactor
I don't think you need a major refactor, just something along these lines
```
let int = cast_with_options(array, &Int64, cast_options)?;
let dict = cast_with_options(
int.as_ref(),
&Dictionary(Box::new(K::DATA_TYPE), Box::new(Int64)),
cast_options,
)?;
cast_with_options(
dict.as_ref(),
&Dictionary(
Box::new(K::DATA_TYPE),
Box::new(Timestamp(TimeUnit::Nanosecond, t)),
),
cast_options,
)
```
> could we go with the pattern in place now
As written this PR will fairly drastically increase the amount of codegen,
you have to understand this code is instantiated for all 8 dictionary key
types, so I think it is important we try to keep this under control.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]