fmeringdal commented on PR #12516:
URL: https://github.com/apache/datafusion/pull/12516#issuecomment-2359453144
Thanks for the quick review @alamb 🙏 I will get some tests added.
I wanted to run an idea by you before I implement the change to restructure
the `WriteOp` enum from:
```rs
pub enum WriteOp {
InsertOverwrite,
InsertReplace,
InsertInto,
Delete,
Update,
Ctas,
}
```
To:
```rs
pub enum WriteOp {
Insert(InsertOp),
Delete,
Update,
Ctas,
}
pub enum InsertOp {
Append, // Represents a regular INSERT INTO operation
Overwrite, // Represents an INSERT OVERWRITE operation
Replace, // Represents an INSERT OR REPLACE operation
}
```
The purpose of such a change would be so that `TableProvider::insert_into`
could take an `op: InsertOp` argument instead of two boolean arguments for
`overwrite` and `replace_into` . I think it makes it slightly more convenient
for implementors of the `insert_into` method to match on an enum rather than
checking two booleans.
What do you think?
--
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]