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

Method insert_into

datafusion/catalog/src/stream.rs:346–363  ·  view source on GitHub ↗
(
        &self,
        _state: &dyn Session,
        input: Arc<dyn ExecutionPlan>,
        _insert_op: InsertOp,
    )

Source from the content-addressed store, hash-verified

344 }
345
346 async fn insert_into(
347 &self,
348 _state: &dyn Session,
349 input: Arc<dyn ExecutionPlan>,
350 _insert_op: InsertOp,
351 ) -> Result<Arc<dyn ExecutionPlan>> {
352 let schema = self.0.source.schema();
353 let orders =
354 create_lex_ordering(schema, &self.0.order, _state.execution_props())?;
355 // It is sufficient to pass only one of the equivalent orderings:
356 let ordering = orders.into_iter().next().map(Into::into);
357
358 Ok(Arc::new(DataSinkExec::new(
359 input,
360 Arc::new(StreamWrite(Arc::clone(&self.0))),
361 ordering,
362 )))
363 }
364}
365
366#[derive(Debug)]

Callers

nothing calls this directly

Calls 8

create_lex_orderingFunction · 0.85
newFunction · 0.85
StreamWriteClass · 0.85
schemaMethod · 0.45
execution_propsMethod · 0.45
mapMethod · 0.45
nextMethod · 0.45
into_iterMethod · 0.45

Tested by

no test coverage detected