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

Method open

datafusion/datasource/src/memory.rs:78–91  ·  view source on GitHub ↗
(
        &self,
        partition: usize,
        _context: Arc<TaskContext>,
    )

Source from the content-addressed store, hash-verified

76
77impl DataSource for MemorySourceConfig {
78 fn open(
79 &self,
80 partition: usize,
81 _context: Arc<TaskContext>,
82 ) -> Result<SendableRecordBatchStream> {
83 Ok(Box::pin(cooperative(
84 MemoryStream::try_new(
85 self.partitions[partition].clone(),
86 Arc::clone(&self.projected_schema),
87 self.projection.clone(),
88 )?
89 .with_fetch(self.fetch),
90 )))
91 }
92
93 fn fmt_as(&self, t: DisplayFormatType, f: &mut fmt::Formatter) -> fmt::Result {
94 match t {

Callers 5

create_writing_threadFunction · 0.45
open_with_argsMethod · 0.45
serializeFunction · 0.45
deserializeFunction · 0.45
newMethod · 0.45

Calls 3

cooperativeFunction · 0.85
with_fetchMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected