You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2019/12/26 09:40:27 UTC

[GitHub] [calcite] jinxing64 opened a new pull request #1695: [CALCITE-3606] Derive target table column list by mistake when conver…

jinxing64 opened a new pull request #1695: [CALCITE-3606] Derive target table column list by mistake when conver…
URL: https://github.com/apache/calcite/pull/1695
 
 
   …t TableModify to Sql string (JinXing)
   
   We should derive the target table column list by the target table itself, not from the input.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [calcite] danny0405 closed pull request #1695: [CALCITE-3606] Derive target table column list by mistake when conver…

Posted by GitBox <gi...@apache.org>.
danny0405 closed pull request #1695: [CALCITE-3606] Derive target table column list by mistake when conver…
URL: https://github.com/apache/calcite/pull/1695
 
 
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [calcite] jinxing64 commented on issue #1695: [CALCITE-3606] Derive target table column list by mistake when conver…

Posted by GitBox <gi...@apache.org>.
jinxing64 commented on issue #1695: [CALCITE-3606] Derive target table column list by mistake when conver…
URL: https://github.com/apache/calcite/pull/1695#issuecomment-569864307
 
 
   Thanks for approval, Danny and Chunwei ~

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [calcite] jinxing64 commented on a change in pull request #1695: [CALCITE-3606] Derive target table column list by mistake when conver…

Posted by GitBox <gi...@apache.org>.
jinxing64 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_r361829839
 
 

 ##########
 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:
   Thanks, Danny~
   I will refine by your comments soon.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [calcite] jinxing64 commented on a change in pull request #1695: [CALCITE-3606] Derive target table column list by mistake when conver…

Posted by GitBox <gi...@apache.org>.
jinxing64 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_r361871530
 
 

 ##########
 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:
   `TableModify.getUpdateColumnList` returns null for `Operation.INSERT` [1]
   I added a test for insert with explicit table columns.
   
   [1] https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/rel/core/TableModify.java#L125

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [calcite] danny0405 commented on a change in pull request #1695: [CALCITE-3606] Derive target table column list by mistake when conver…

Posted by GitBox <gi...@apache.org>.
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:
users@infra.apache.org


With regards,
Apache Git Services