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

RelOptPredicateList may generate incorrect map of constant values

    XMLWordPrintableJSON

Details

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              jcamacho Jesús Camacho Rodríguez
              jcamacho Jesús Camacho Rodríguez
              Votes:
              0 Vote for this issue
              Watchers:
              1 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
                  1h