Joseph-Rance commented on code in PR #4773:
URL: https://github.com/apache/arrow-rs/pull/4773#discussion_r1329854569


##########
parquet_derive/src/parquet_field.rs:
##########
@@ -223,6 +223,80 @@ impl Field {
         }
     }
 
+    /// Takes the parsed field of the struct and emits a valid
+    /// column reader snippet. Should match exactly what you
+    /// would write by hand.
+    ///
+    /// Can only generate writers for basic structs, for example:
+    ///
+    /// struct Record {
+    ///   a_bool: bool
+    /// }
+    ///
+    /// but not
+    ///
+    /// struct UnsupportedNestedRecord {
+    ///   a_property: bool,
+    ///   nested_record: Record
+    /// }
+    ///
+    /// because this parsing logic is not sophisticated enough for definition
+    /// levels beyond 2.
+    ///
+    /// `Option` types and references not supported
+    pub fn reader_snippet(&self) -> proc_macro2::TokenStream {
+        use parquet::basic::Type as BasicType;
+
+        let ident = &self.ident;
+        let column_reader = self.ty.column_reader();
+        let parquet_type = self.ty.physical_type_as_rust();
+
+        let default_type = match self.ty.physical_type() {

Review Comment:
   fixed in 
[9f2dd9f](https://github.com/apache/arrow-rs/pull/4773/commits/9f2dd9f901462b6221bc7ba9fab04343c85469b6)



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