You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Jesus Camacho Rodriguez (Jira)" <ji...@apache.org> on 2020/04/08 04:04:00 UTC

[jira] [Resolved] (CALCITE-3898) RelOptPredicateList may generate incorrect map of constant values

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

Jesus Camacho Rodriguez resolved CALCITE-3898.
----------------------------------------------
    Fix Version/s: 1.23.0
       Resolution: Fixed

Fixed in [c3147f477f843d283c43d1e858534d58a7174544|https://github.com/apache/calcite/commit/c3147f477f843d283c43d1e858534d58a7174544].

> RelOptPredicateList may generate incorrect map of constant values
> -----------------------------------------------------------------
>
>                 Key: CALCITE-3898
>                 URL: https://issues.apache.org/jira/browse/CALCITE-3898
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>            Reporter: Jesus Camacho Rodriguez
>            Assignee: Jesus Camacho Rodriguez
>            Priority: Critical
>              Labels: pull-request-available
>             Fix For: 1.23.0
>
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> The method relies on {{RexUtil.predicateConstants}} which in turn calls {{RexUtil.canAssignFrom}}. {{RexUtil.canAssignFrom}} is skipping any check on precision and scale. I observed the error in Hive when two VARCHAR types with different precision were given to the method, which was resulting on considering the result of the narrowing cast as the value of the reference. This lead to incorrect results.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)