[ https://issues.apache.org/jira/browse/IGNITE-2294?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15390461#comment-15390461 ]
Alexander Paschenko commented on IGNITE-2294: --------------------------------------------- I have implemented "naive" version of MERGE statement (YAY!, though of course it still is a very long way to go). As for now, it only supports inserting at per row basis ("merge into XXX(cols) values(row1), (row2)" kind of thing), and does not support subqueries, functions and any other fancy stuff. Also it does not, and most likely will not, support custom merge key (KEY clause of MERGE statement, see http://www.h2database.com/html/grammar.html#merge for grammar details) because it violates the idea of strictly set key. (We explicitly set both key and value types when we create cache configuration, remember?) Still, I think one important and interesting thing about this contribution is that it includes concept of the key computed/provided by value object. On the mailing list Alexey Goncharuk raised concern about how we supply keys for newly inserted values - and that's exactly what that concept addresses. So, as for now, there is two ways to supply keys for new values - either via literals (familiar _key column), or via special field or method. My pull request (that is of course to be updated in the nearest future) linked to this issue includes demo of both ways in the form of a test - please see IgniteCacheMergeSqlQuerySelfTest if you are interested. Also, the test showcases this feature in "direct" fashion - without using JDBC driver: it just invokes newly introduced IgniteCache.update() operation. JDBC support is on the way. Have a nice weekend everyone! > Implement SQL DML (insert, update, delete) clauses. > --------------------------------------------------- > > Key: IGNITE-2294 > URL: https://issues.apache.org/jira/browse/IGNITE-2294 > Project: Ignite > Issue Type: Wish > Reporter: Sergi Vladykin > Assignee: Alexander Paschenko > Fix For: 1.7 > > > We need to add parsing for all the listed SQL commands and translate them > into respective cache operations (putIfAbstent, put, remove). -- This message was sent by Atlassian JIRA (v6.3.4#6332)