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

Function morsel_two_ios_one_batch

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

Source from the content-addressed store, hash-verified

766 /// producing one batch, similar to Parquet.
767 #[tokio::test]
768 async fn morsel_two_ios_one_batch() -> Result<()> {
769 let test = FileStreamMorselTest::new().with_file(
770 MockPlanner::builder("file1.parquet")
771 .add_plan(PendingPlannerBuilder::new(IoFutureId(1)))
772 .add_plan(PendingPlannerBuilder::new(IoFutureId(2)))
773 .add_plan(MockPlanBuilder::new().with_morsel(MorselId(10), 42))
774 .return_none(),
775 );
776
777 insta::assert_snapshot!(test.run().await.unwrap(), @r"
778 ----- Output Stream -----
779 Batch: 42
780 Done
781 ----- File Stream Events -----
782 morselize_file: file1.parquet
783 planner_created: file1.parquet
784 planner_called: file1.parquet
785 io_future_created: file1.parquet, IoFutureId(1)
786 io_future_polled: file1.parquet, IoFutureId(1)
787 io_future_resolved: file1.parquet, IoFutureId(1)
788 planner_called: file1.parquet
789 io_future_created: file1.parquet, IoFutureId(2)
790 io_future_polled: file1.parquet, IoFutureId(2)
791 io_future_resolved: file1.parquet, IoFutureId(2)
792 planner_called: file1.parquet
793 morsel_produced: file1.parquet, MorselId(10)
794 morsel_stream_started: MorselId(10)
795 morsel_stream_batch_produced: MorselId(10), BatchId(42)
796 morsel_stream_finished: MorselId(10)
797 ");
798
799 Ok(())
800 }
801
802 /// Verifies that a planner I/O future can fail and terminate the stream.
803 #[tokio::test]

Callers

nothing calls this directly

Calls 7

newFunction · 0.85
IoFutureIdClass · 0.85
MorselIdClass · 0.85
return_noneMethod · 0.80
add_planMethod · 0.80
with_morselMethod · 0.80
with_fileMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…