-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
DELETE syntax for MSQ #14145
Comments
Can I work on this issue ?? |
This issue has been marked as stale due to 280 days of inactivity. |
This issue has been closed due to lack of activity. If you think that |
Description
Currently, MSQ supports INSERT (for adding data) and REPLACE (for replacing rows). REPLACE, however, has the potential to also drop segments, by replacing it with an empty set. This works by reingesting the entire data except for the part to be deleted based on some condition.
This is a proposal to add a new DELETE syntax, that would allow users to more easily specify what they want to do without having to understand the concept of reindexing. Internally, this would translate to a REPLACE query, with the inverted condition of the DELETE, so that all rows except the ones in the DELETE are reingested. This means that not many changes would be needed in the MSQ part of Druid.
Example:
would be translated to
Syntax
This is similar is structure to a DELETE query from SQL, with the addition of partitioning and clustering. For a DELETE, ideally it should not be required to define these. However, since internally, we reindex the table it is required. If there is a mechanism to get the partitioning/clustering of a datasource while parsing, it would be possible to make those parameters optional, making the query simpler:
PR
There is one PR, which is still a work in progress.
#13674
The text was updated successfully, but these errors were encountered: