nevi-me commented on a change in pull request #8402:
URL: https://github.com/apache/arrow/pull/8402#discussion_r512244506



##########
File path: rust/parquet/src/arrow/arrow_writer.rs
##########
@@ -176,19 +176,175 @@ fn write_leaves(
             }
             Ok(())
         }
+        ArrowDataType::Dictionary(key_type, value_type) => {
+            use arrow_array::{
+                Int16DictionaryArray, Int32DictionaryArray, 
Int64DictionaryArray,
+                Int8DictionaryArray, PrimitiveArray, StringArray, 
UInt16DictionaryArray,
+                UInt32DictionaryArray, UInt64DictionaryArray, 
UInt8DictionaryArray,
+            };
+            use ArrowDataType::*;
+            use ColumnWriter::*;
+
+            let array = &**array;
+            let mut col_writer = get_col_writer(&mut row_group_writer)?;
+            let levels = levels.pop().expect("Levels exhausted");
+
+            macro_rules! dispatch_dictionary {
+                ($($kt: pat, $vt: pat, $w: ident => $kat: ty, $vat: ty,)*) => (
+                    match (&**key_type, &**value_type, &mut col_writer) {
+                        $(($kt, $vt, $w(writer)) => write_dict::<$kat, $vat, 
_>(array, writer, levels),)*
+                        (kt, vt, _) => panic!("Don't know how to write 
dictionary of <{:?}, {:?}>", kt, vt),

Review comment:
       @carols10cents do we have to worry about this panic? If so, we can still 
address it in a future PR. I must have missed it over the weekend.




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


Reply via email to