danny0405 commented on a change in pull request #1695: [CALCITE-3606] Derive 
target table column list by mistake when conver…
URL: https://github.com/apache/calcite/pull/1695#discussion_r361633648
 
 

 ##########
 File path: 
core/src/main/java/org/apache/calcite/rel/rel2sql/RelToSqlConverter.java
 ##########
 @@ -702,7 +702,7 @@ public Result visit(TableModify modify) {
 
       final SqlInsert sqlInsert =
           new SqlInsert(POS, SqlNodeList.EMPTY, sqlTargetTable, sqlSource,
-              identifierList(modify.getInput().getRowType().getFieldNames()));
+              identifierList(modify.getTable().getRowType().getFieldNames()));
 
 
 Review comment:
   Shouldn't we use `TableModify.getUpdateColumnList` ? Also add a test for 
insert with explicit table columns.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to