andrew-rj opened a new issue, #6879:
URL: https://github.com/apache/arrow-rs/issues/6879

   **Is your feature request related to a problem or challenge? Please describe 
what you are trying to do.**
   I'm trying to have a single struct with optional fields that can be written 
and read as parquet. I want to have something like this:
   ```
   #[derive(ParquetRecordWriter, ParquetRecordReader, Default)]
   pub(crate) struct TabularIdentifier {
       id: u64,
       type: String,
       maybe_thing: Option<String>,
   }
   ```
   
   This however does not compile. I get a compiler error that looks like this:
   ```
   error: proc-macro derive panicked
      --> src/bin/commands/generators/parquet/records.rs:146:31
       |
   146 | #[derive(ParquetRecordWriter, ParquetRecordReader, Default)]
       |                               ^^^^^^^^^^^^^^^^^^^
       |
       = help: message: not implemented: Unsupported: Option(
                   TypePath(
                       Type::Path {
                           qself: None,
                           path: Path {
                               leading_colon: None,
                               segments: [
                                   PathSegment {
                                       ident: Ident {
                                           ident: "String",
                                           span: #0 bytes(90325..90331),
                                       },
                                       arguments: PathArguments::None,
                                   },
                               ],
                           },
                       },
                   ),
               )
   
   ```
   
   **Describe the solution you'd like**
   It would be really helpful to be able to encode and decode a single struct 
that has optional fields via `parquet-derive`.
   
   **Describe alternatives you've considered**
   An alternative might be a more manual process that reads out the parquet 
data and constructs the struct. That is a fair bit more manual than I would 
like.
   


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