-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Partitioned DML #94
Conversation
@apstndb Please review this PR when you have time. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a major update!
TRUNCATE TABLE
can be an alias of PARTITIONED DELETE `tbl` WHERE TRUE
in both of semantics and implementation.
The behavior will be clear, so why not make it an alias by the time you release it?
@@ -78,6 +78,11 @@ var ( | |||
// DML | |||
dmlRe = regexp.MustCompile(`(?is)^(INSERT|UPDATE|DELETE)\s+.+$`) | |||
|
|||
// Partitioned DML | |||
// In fact, INSERT is not supported in a Partitioned DML, but accept it for showing better error message. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Initially I implemented so, but I have found error messages (example) have to be different from Partitioned DML, so I kept the implementation of |
OK, I understand the reason. Another choice:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks for reviewing!
Yeah that's totally fine. Then let's change the implementation once we emulate other SQL functionalities with Partitioned DML 👍 |
Syntax:
PARTITIONED (UPDATE|DELETE) ...;
Example:
close: #93