zhuqi-lucas commented on issue #14394:
URL: https://github.com/apache/datafusion/issues/14394#issuecomment-2631299645
```rust
LogicalPlan::Dml(DmlStatement {
table_name,
op: WriteOp::Insert(insert_op),
..
}) => {
let name = table_name.table();
let schema =
session_state.schema_for_ref(table_name.clone())?;
if let Some(provider) = schema.table(name).await? {
let input_exec = children.one()?;
provider
.insert_into(session_state, input_exec, *insert_op)
.await?
} else {
return exec_err!("Table '{table_name}' does not exist");
}
}
```
I think we may can add check during the physical plan generation, we have
the table schema, also we have the input_exec to insert into, so we can check
here?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]