Hi All, I'm initiating a discussion thread proposing the SQL++ UPDATE statement in AsterixDB. *Feature:* Adding support for SQL++ UPDATE statement. *Details:* AsterixDB currently does not support UPDATE operations without having to pass an entire new object to replace an existing record in a collection. The following proposal discusses syntax and semantics of the UPDATE statement as part of SQL++ for AsterixDB.
We plan to implement this feature by rewriting the UPDATE statement into its equivalent UPSERT form, allowing us to reuse the existing LSM-tree UPSERT machinery to handle the transformed incoming record. To apply transformations to an incoming record, we employ the following approach: 1. We recursively traverse the hierarchy of transformations as specified by the user in the query. 2. At each hierarchical level, we rewrite the transformation to the equivalent record-merge() built-in function. 3. These rewritten record-merge() transformations are then combined in a bottom-up manner, finally producing the final transformation function. APE : https://cwiki.apache.org/confluence/display/ASTERIXDB/APE+9%3A+UPDATE+Statement