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


##########
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:
   Good question. It seems I copied it from `fn physical_type()` above



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