You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Haisheng Yuan (Jira)" <ji...@apache.org> on 2019/11/09 19:05:00 UTC
[jira] [Resolved] (CALCITE-3469) Wrong rel used in
SubstitutionVisitor#rowTypesAreEquivalent
[ https://issues.apache.org/jira/browse/CALCITE-3469?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Haisheng Yuan resolved CALCITE-3469.
------------------------------------
Fix Version/s: 1.22.0
Resolution: Fixed
Fixed in https://github.com/apache/calcite/commit/6ee48c66c8a51bfd9734b20927e4c2e919575bc4, thanks for the PR, [~daimin]!
> Wrong rel used in SubstitutionVisitor#rowTypesAreEquivalent
> -----------------------------------------------------------
>
> Key: CALCITE-3469
> URL: https://issues.apache.org/jira/browse/CALCITE-3469
> Project: Calcite
> Issue Type: Bug
> Components: core
> Reporter: daimin
> Priority: Minor
> Labels: pull-request-available
> Fix For: 1.22.0
>
> Time Spent: 1h 40m
> Remaining Estimate: 0h
>
> {code:java}
> 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();
> }
> {code}
> Where
> {code:java}
> Pair.zip(rel0.rowType.getFieldList(), rel0.rowType.getFieldList())
> {code}
> should be
> {code:java}
> Pair.zip(rel0.rowType.getFieldList(), rel1.rowType.getFieldList())
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)