You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/03/28 13:24:29 UTC

[GitHub] [arrow-datafusion] silence-coding commented on issue #1967: Parquet reader thread terminated due to error: Execution("channel closed") for files

silence-coding commented on issue #1967:
URL: https://github.com/apache/arrow-datafusion/issues/1967#issuecomment-1080647173


   The error cause is that the API is incorrectly used. You should use while let Some here.
   ```
       let mut record_batches = df.execute_stream().await?;
       // create a plan to run a SQL query
       let fieds = df.schema().fields();
   //  should use while let Some here.
       for record in record_batches.next().await {
           let record = record.unwrap();
           let rows = record.num_rows();
           let cols = record.num_columns();
           for row in 0..rows {
               for col in 0..cols {
                   let data = array_value_to_string(record.column(col), row).unwrap();
                   print!("{}: {:?}, ", fieds[col].name(), data);
               }
               println!();
           }
       }
   ```


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org