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

Function morsel_io_error

datafusion/datasource/src/file_stream/mod.rs:804–826  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

802 /// Verifies that a planner I/O future can fail and terminate the stream.
803 #[tokio::test]
804 async fn morsel_io_error() -> Result<()> {
805 let test = FileStreamMorselTest::new().with_file(
806 MockPlanner::builder("file1.parquet").add_plan(
807 PendingPlannerBuilder::new(IoFutureId(1))
808 .with_error("io failed while opening file"),
809 ),
810 );
811
812 insta::assert_snapshot!(test.run().await.unwrap(), @r"
813 ----- Output Stream -----
814 Error: io failed while opening file
815 Done
816 ----- File Stream Events -----
817 morselize_file: file1.parquet
818 planner_created: file1.parquet
819 planner_called: file1.parquet
820 io_future_created: file1.parquet, IoFutureId(1)
821 io_future_polled: file1.parquet, IoFutureId(1)
822 io_future_errored: file1.parquet, IoFutureId(1), io failed while opening file
823 ");
824
825 Ok(())
826 }
827
828 /// Verifies that pending planner I/O does not block draining the current
829 /// morsel stream.

Callers

nothing calls this directly

Calls 5

newFunction · 0.85
IoFutureIdClass · 0.85
add_planMethod · 0.80
with_fileMethod · 0.45
with_errorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…