milenkovicm commented on code in PR #14631: URL: https://github.com/apache/datafusion/pull/14631#discussion_r1956209104
########## datafusion/expr/src/logical_plan/dml.rs: ########## @@ -91,31 +91,64 @@ impl Hash for CopyTo { /// The operator that modifies the content of a database (adapted from /// substrait WriteRel) -#[derive(Debug, Clone, PartialEq, Eq, Hash)] +#[derive(Clone)] pub struct DmlStatement { /// The table name pub table_name: TableReference, - /// The schema of the table (must align with Rel input) - pub table_schema: DFSchemaRef, + /// this is target table to insert into + pub target: Arc<dyn TableSource>, /// The type of operation to perform pub op: WriteOp, /// The relation that determines the tuples to add/remove/modify the schema must match with table_schema pub input: Arc<LogicalPlan>, /// The schema of the output relation pub output_schema: DFSchemaRef, } +impl Eq for DmlStatement {} +impl Hash for DmlStatement { + fn hash<H: Hasher>(&self, state: &mut H) { + self.table_name.hash(state); + self.target.schema().hash(state); Review Comment: I see no name in `TableSource` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org