Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-3469

Wrong rel used in SubstitutionVisitor#rowTypesAreEquivalent

    XMLWordPrintableJSON

    Details

      Description

        private boolean rowTypesAreEquivalent(
            MutableRel rel0, MutableRel rel1, Litmus litmus) {
          if (rel0.rowType.getFieldCount() != rel1.rowType.getFieldCount()) {
            return litmus.fail("Mismatch for column count: [{}]", Pair.of(rel0, rel1));
          }
          for (Pair<RelDataTypeField, RelDataTypeField> pair
              : Pair.zip(rel0.rowType.getFieldList(), rel0.rowType.getFieldList())) {
            if (!pair.left.getType().equals(pair.right.getType())) {
              return litmus.fail("Mismatch for column type: [{}]", Pair.of(rel0, rel1));
            }
          }
          return litmus.succeed();
        }
      

      Where

      Pair.zip(rel0.rowType.getFieldList(), rel0.rowType.getFieldList())
      

      should be

      Pair.zip(rel0.rowType.getFieldList(), rel1.rowType.getFieldList())
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                daimin daimin
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 40m
                  1h 40m