alexhallam edited a comment on issue #983:
URL: https://github.com/apache/arrow-rs/issues/983#issuecomment-1033564411


   I am getting an error with the code below
   
   ```rust
       fn pull_rows(row: &parquet::record::Row) -> Vec<std::string::String> {
           row.get_column_iter()
               .map(|c: (&String, &Field)| match c.1 {
                   Field::Float(f) => format!("{}", f),
                   Field::Double(f) => format!("{}", f),
                   _ => c.1.to_string(),
               })
               .collect::<Vec<_>>()
       }
   ```
   
   
   here is the error
   
   ```
   error[E0599]: no associated item named `Float` found for struct 
`arrow::datatypes::Field` in the current scope
      --> src/main.rs:292:24
       |
   292 |                 Field::Float(f) => format!("{}", f), // or however 
else you wanted to format floats
       |                        ^^^^^ associated item not found in 
`arrow::datatypes::Field`
   
   error[E0599]: no associated item named `Double` found for struct 
`arrow::datatypes::Field` in the current scope
      --> src/main.rs:293:24
       |
   293 |                 Field::Double(f) => format!("{}", f), // or however 
else you wanted to format floats
       |                        ^^^^^^ associated item not found in 
`arrow::datatypes::Field`
   ```
   
   Since `Field::Float` does not exist I am guessing I will need to do 
something like a `f.data_type` as shown here 
https://docs.rs/arrow/3.0.0/arrow/datatypes/struct.Field.html


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