[ https://issues.apache.org/jira/browse/CALCITE-1527?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15724154#comment-15724154 ]
Julian Hyde commented on CALCITE-1527: -------------------------------------- My main concern is that you have not implemented {{INSERT ... SELECT}}, only {{INSERT ... VALUES}}. Do I have that correct? Since Values is just a RelNode, I wonder whether you could push all supported RelNodes to the JDBC source; you'd get VALUES for free (so you could get rid of SQL_INSERT_VALUES_OPERATOR), and also many variants of SELECT (whatever that dialect of SQL supports). Except for that, the change looks very good. A few minor notes: * Is the {{@Ignore("CALCITE-1527")}} needed? * How about the commented lines {{doWithConnection(new SqlInsertFunction())}}? * Can you explain why {{@FixMethodOrder(MethodSorters.NAME_ASCENDING)}} is needed? * The {{if (modify.getOperation().equals(Operation.INSERT))}} block can be converted to a switch. Can you do so. * Can you add javadoc for {{sourceExpressionList}} in {{TableModify}} (either the field or the constructor). Is it required for UPDATE? Is it not allowed for INSERT and DELETE? Add a {{Preconditions.checkArgument}} call to enforce the constraint. > Support DML in the JDBC adapter > ------------------------------- > > Key: CALCITE-1527 > URL: https://issues.apache.org/jira/browse/CALCITE-1527 > Project: Calcite > Issue Type: Bug > Components: jdbc-adapter > Reporter: Christian Tzolov > > Currently the JDBC adapter does not support the DML operations: *INSERT*, > *DELETE* and *UPDATE*. > Solution needs to convert the parsed *Modify* and *Values* RelNodes into > *JdbcTableModify*, *JdbcValues* ... such and then in turn into corresponding > SqlInsert, SqlUpdate and SqlDelete. -- This message was sent by Atlassian JIRA (v6.3.4#6332)