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

Method open

datafusion/datasource-avro/src/source.rs:57–68  ·  view source on GitHub ↗
(
        &self,
        reader: R,
        projection: Option<Vec<usize>>,
    )

Source from the content-addressed store, hash-verified

55 }
56
57 fn open<R: std::io::BufRead>(
58 &self,
59 reader: R,
60 projection: Option<Vec<usize>>,
61 ) -> Result<Reader<R>> {
62 let mut builder = ReaderBuilder::new()
63 .with_batch_size(self.batch_size.expect("Batch size must set before open"));
64 if let Some(projection) = projection {
65 builder = builder.with_projection(projection);
66 }
67 builder.build(reader).map_err(Into::into)
68 }
69
70 fn projected_file_schema(&self) -> SchemaRef {
71 let file_schema = self.table_schema.file_schema();

Callers

nothing calls this directly

Calls 14

newFunction · 0.85
projected_file_schemaMethod · 0.80
make_adapterMethod · 0.80
adapt_batchMethod · 0.80
readerMethod · 0.80
with_batch_sizeMethod · 0.45
with_projectionMethod · 0.45
buildMethod · 0.45
getMethod · 0.45
as_refMethod · 0.45
schemaMethod · 0.45

Tested by

no test coverage detected