pub struct DmlStatement {
    pub table_name: TableReference,
    pub target: Arc<dyn TableSource>,
    pub op: WriteOp,
    pub input: Arc<LogicalPlan>,
    pub output_schema: DFSchemaRef,
}Expand description
Modifies the content of a database
This operator is used to perform DML operations such as INSERT, DELETE, UPDATE, and CTAS (CREATE TABLE AS SELECT).
- 
INSERT- Appends new rows to the existing table. CallsTableProvider::insert_into - 
DELETE- Removes rows from the table. Currently NOT supported by theTableProvidertrait or builtin sources. - 
UPDATE- Modifies existing rows in the table. Currently NOT supported by theTableProvidertrait or builtin sources. - 
CREATE TABLE AS SELECT- Creates a new table and populates it with data from a query. This is similar to theINSERToperation, but it creates a new table instead of modifying an existing one. 
Note that the structure is adapted from substrait WriteRel)
Fields§
§table_name: TableReferenceThe table name
target: Arc<dyn TableSource>this is target table to insert into
op: WriteOpThe type of operation to perform
input: Arc<LogicalPlan>The relation that determines the tuples to add/remove/modify the schema must match with table_schema
output_schema: DFSchemaRefThe schema of the output relation
Implementations§
Source§impl DmlStatement
 
impl DmlStatement
Sourcepub fn new(
    table_name: TableReference,
    target: Arc<dyn TableSource>,
    op: WriteOp,
    input: Arc<LogicalPlan>,
) -> Self
 
pub fn new( table_name: TableReference, target: Arc<dyn TableSource>, op: WriteOp, input: Arc<LogicalPlan>, ) -> Self
Creates a new DML statement with the output schema set to a single count column.
Sourcepub fn name(&self) -> &str
 
pub fn name(&self) -> &str
Return a descriptive name of this DmlStatement
Trait Implementations§
Source§impl Clone for DmlStatement
 
impl Clone for DmlStatement
Source§fn clone(&self) -> DmlStatement
 
fn clone(&self) -> DmlStatement
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DmlStatement
 
impl Debug for DmlStatement
Source§impl Hash for DmlStatement
 
impl Hash for DmlStatement
Source§impl PartialEq for DmlStatement
 
impl PartialEq for DmlStatement
Source§impl PartialOrd for DmlStatement
 
impl PartialOrd for DmlStatement
impl Eq for DmlStatement
Auto Trait Implementations§
impl Freeze for DmlStatement
impl !RefUnwindSafe for DmlStatement
impl Send for DmlStatement
impl Sync for DmlStatement
impl Unpin for DmlStatement
impl !UnwindSafe for DmlStatement
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
 
impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
    T: Clone,
 
impl<T> CloneToUninit for Twhere
    T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
 
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
 
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
 
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
 
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
 
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
 
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
 
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more