Rich-T-kid commented on code in PR #12161:
URL: https://github.com/apache/arrow-rs/pull/12161#discussion_r4545994522


##########
parquet/src/arrow/array_reader/byte_array_dictionary.rs:
##########
@@ -227,13 +247,38 @@ where
         let buffer = self.record_reader.consume_record_data();
         let null_buffer = self.record_reader.consume_compact_bitmap();
 
-        let array = match &self.buffer_type {
-            None => buffer.into_array(null_buffer, &self.data_type, &mut 
self.hash_scratch)?,
-            Some(buffer_type) => {
+        let ArrowType::Dictionary(_, output_value_type) = &self.data_type else 
{
+            unreachable!()
+        };
+        let cache_converted_values = matches!(&buffer, DictionaryBuffer::Dict 
{ .. });
+        let convert_values = cache_converted_values
+            || matches!(
+                output_value_type.as_ref(),
+                ArrowType::Utf8View | ArrowType::BinaryView
+            );
+
+        let array = match (&self.buffer_type, convert_values) {
+            (Some(buffer_type), true) => {

Review Comment:
   this should be an easy enough fix so I'll include it in this PR. split out 
into 
https://github.com/apache/arrow-rs/pull/12161/changes/9eccacf9007775b9ecd7a5266a6ccf3316ba4da3



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

Reply via email to