conradludgate commented on code in PR #5773:
URL: https://github.com/apache/arrow-rs/pull/5773#discussion_r1603139093


##########
parquet_derive/src/parquet_field.rs:
##########
@@ -638,11 +636,40 @@ impl Type {
             }
             "f32" => BasicType::FLOAT,
             "f64" => BasicType::DOUBLE,
-            "String" | "str" | "Uuid" => BasicType::BYTE_ARRAY,
+            "String" | "str" => BasicType::BYTE_ARRAY,
+            "Uuid" => BasicType::FIXED_LEN_BYTE_ARRAY,
             f => unimplemented!("{} currently is not supported", f),
         }
     }
 
+    fn length(&self) -> Option<i32> {
+        let last_part = self.last_part();
+        let leaf_type = self.leaf_type_recursive();
+
+        match leaf_type {
+            Type::Array(ref first_type) => {
+                if let Type::TypePath(_) = **first_type {
+                    if last_part == "u8" {
+                        return Some(1);
+                    }
+                }
+            }
+            Type::Vec(ref first_type) | Type::Slice(ref first_type) => {
+                if let Type::TypePath(_) = **first_type {
+                    if last_part == "u8" {
+                        return None;
+                    }
+                }
+            }
+            _ => (),
+        }

Review Comment:
   Ok, it seems the intention was for `[u8; N]` to be length N, but it seems 
incorrect. It also seems like `[u8; N]` just isn't supported either in my 
testing.



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