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

Method new

datafusion-examples/examples/custom_data_source/custom_datasource.rs:195–207  ·  view source on GitHub ↗
(
        projections: Option<&Vec<usize>>,
        schema: SchemaRef,
        db: CustomDataSource,
    )

Source from the content-addressed store, hash-verified

193impl CustomExec {
194 #[expect(clippy::needless_pass_by_value)]
195 fn new(
196 projections: Option<&Vec<usize>>,
197 schema: SchemaRef,
198 db: CustomDataSource,
199 ) -> Self {
200 let projected_schema = project_schema(&schema, projections).unwrap();
201 let cache = Self::compute_properties(projected_schema.clone());
202 Self {
203 db,
204 projected_schema,
205 cache: Arc::new(cache),
206 }
207 }
208
209 /// This function creates the cache object that stores the plan properties such as schema, equivalence properties, ordering, partitioning, etc.
210 fn compute_properties(schema: SchemaRef) -> PlanProperties {

Callers

nothing calls this directly

Calls 3

project_schemaFunction · 0.85
newFunction · 0.85
cloneMethod · 0.45

Tested by

no test coverage detected