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

Method plan

datafusion/datasource/src/morsel/adapters.rs:90–105  ·  view source on GitHub ↗
(self: Box<Self>)

Source from the content-addressed store, hash-verified

88
89impl MorselPlanner for FileOpenFutureMorselPlanner {
90 fn plan(self: Box<Self>) -> Result<Option<MorselPlan>> {
91 match *self {
92 Self::Unopened { file_opener, file } => {
93 let io_future = async move {
94 let stream = file_opener.open(*file)?.await?;
95 Ok(Box::new(Self::ReadyStream(stream)) as Box<dyn MorselPlanner>)
96 }
97 .boxed();
98 Ok(Some(MorselPlan::new().with_pending_planner(io_future)))
99 }
100 Self::ReadyStream(stream) => Ok(Some(
101 MorselPlan::new()
102 .with_morsels(vec![Box::new(FileStreamMorsel { stream })]),
103 )),
104 }
105 }
106}
107
108struct FileStreamMorsel {

Callers

nothing calls this directly

Calls 4

newFunction · 0.85
with_morselsMethod · 0.80
openMethod · 0.45
with_pending_plannerMethod · 0.45

Tested by

no test coverage detected