[ 
https://issues.apache.org/jira/browse/CALCITE-6742?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated CALCITE-6742:
------------------------------------
    Labels: pull-request-available  (was: )

> StandardConvertletTable.convertCall loses casts from ROW comparisons
> --------------------------------------------------------------------
>
>                 Key: CALCITE-6742
>                 URL: https://issues.apache.org/jira/browse/CALCITE-6742
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.38.0
>            Reporter: Mihai Budiu
>            Assignee: Mihai Budiu
>            Priority: Minor
>              Labels: pull-request-available
>
> The code in convertCall looks like this:
> {code:java}
>   if (op.kind == SqlKind.EQUALS) {
>       final RexNode expr0 = RexUtil.removeCast(exprs.get(0));
>       final RexNode expr1 = RexUtil.removeCast(exprs.get(1));
>       if (expr0.getKind() == SqlKind.ROW && expr1.getKind() == SqlKind.ROW) {
>         final RexCall call0 = (RexCall) expr0;
>         final RexCall call1 = (RexCall) expr1;
>         final List<RexNode> eqList = new ArrayList<>();
>         Pair.forEach(call0.getOperands(), call1.getOperands(), (x, y) ->
>             eqList.add(rexBuilder.makeCall(call.getParserPosition(), op, x, 
> y)));
>         return RexUtil.composeConjunction(rexBuilder, eqList);
>       }
>     }
> {code}
> The casts removed from expr0 and expr1 are simply ignored. They should not be 
> stripped out. In the worst case, they should be decomposed into field-wise 
> casts and inserted on the corresponding field comparisons.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to