MCPcopy Create free account
hub / github.com/apache/datafusion / with_on_error

Method with_on_error

datafusion/datasource/src/file_stream/mod.rs:82–90  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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 {

Callers 6

resultMethod · 0.45
on_error_openingFunction · 0.45
on_error_scanning_failFunction · 0.45
on_error_opening_failFunction · 0.45
on_error_scanningFunction · 0.45
on_error_mixedFunction · 0.45

Calls 1

set_on_errorMethod · 0.80

Tested by

no test coverage detected