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/06 17:36:00 UTC

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

Jesus Camacho Rodriguez created CALCITE-3898:
------------------------------------------------

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


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)