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/11/04 01:45:36 UTC

[GitHub] [calcite] chunweilei commented on a change in pull request #1555: [CALCITE-3469] Typo in SubstitutionVisitor#rowTypesAreEquivalent

chunweilei commented on a change in pull request #1555: [CALCITE-3469] Typo in SubstitutionVisitor#rowTypesAreEquivalent
URL: https://github.com/apache/calcite/pull/1555#discussion_r341887663
 
 

 ##########
 File path: core/src/main/java/org/apache/calcite/plan/SubstitutionVisitor.java
 ##########
 @@ -612,7 +612,7 @@ private boolean rowTypesAreEquivalent(
       return litmus.fail("Mismatch for column count: [{}]", Pair.of(rel0, rel1));
     }
     for (Pair<RelDataTypeField, RelDataTypeField> pair
-        : Pair.zip(rel0.rowType.getFieldList(), rel0.rowType.getFieldList())) {
+        : Pair.zip(rel0.rowType.getFieldList(), rel1.rowType.getFieldList())) {
       if (!pair.left.getType().equals(pair.right.getType())) {
         return litmus.fail("Mismatch for column type: [{}]", Pair.of(rel0, rel1));
 
 Review comment:
   IMO, it is not very hard to provide a test case for this change since the code before change will never throw an exception due to `pair.left.getType().equals(pair.right.getType())` is always true.

----------------------------------------------------------------
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