carols10cents commented on pull request #8402: URL: https://github.com/apache/arrow/pull/8402#issuecomment-715412380
> @carols10cents -- one idea I had which might be less efficient at runtime but possibly be less complicated to implement, would be to use the arrow `cast` kernels here: [https://github.com/apache/arrow/blob/master/rust/arrow/src/compute/kernels/cast.rs](https://github.com/apache/arrow/blob/master/rust/arrow/src/compute/kernels/cast.rs?rgh-link-date=2020-10-23T15%3A02%3A00Z) > > So rather than going directly from `ParquetType` to `DesiredArrowType` we could go from `ParquetType --> CanonicalArrowType` and then from `CanonicalArrowType` --> `DesiredArrowType` > > So for example, to generate a Dictionary<UInt8, Utf8> from a parquet column of `Utf8` you could always create `Dictionary<Uint64, Utf8>` and then use `cast` to go to the desired arrow type > > Does that make sense? Not really, because I am using the `cast` kernels in the `Converter`: [`4b59fc9` (#8402)](https://github.com/apache/arrow/pull/8402/commits/4b59fc952336bee757cf27ae596b56edbccf099a#diff-1c415d3e7b8a0ac89a3b07a88aaf2d1f4a3c0c289233440776be1f76f846b7d5R307-R344) in the style of the other converters in that file, so I'm not sure how to rearrange that to reduce complexity :-/ Could you possibly put together a code sketch of what you mean? ---------------------------------------------------------------- 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: us...@infra.apache.org