Specify the behavior when an error occurs opening or scanning a file If `OnError::Skip` the stream will skip files which encounter an error and continue If `OnError:Fail` (default) the stream will fail and stop processing when an error occurs
(mut self, on_error: OnError)
| 80 | /// If `OnError::Skip` the stream will skip files which encounter an error and continue |
| 81 | /// If `OnError:Fail` (default) the stream will fail and stop processing when an error occurs |
| 82 | pub fn with_on_error(mut self, on_error: OnError) -> Self { |
| 83 | match &mut self.state { |
| 84 | FileStreamState::Scan { scan_state } => scan_state.set_on_error(on_error), |
| 85 | FileStreamState::Error | FileStreamState::Done => { |
| 86 | // no effect as there are no more files to process |
| 87 | } |
| 88 | }; |
| 89 | self |
| 90 | } |
| 91 | |
| 92 | fn poll_inner(&mut self, cx: &mut Context<'_>) -> Poll<Option<Result<RecordBatch>>> { |
| 93 | loop { |
no test coverage detected