Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-20291

NaNvl(FloatType, NullType) should not be cast to NaNvl(DoubleType, DoubleType)

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0, 2.0.1, 2.0.2, 2.1.0
    • Fix Version/s: 2.0.3, 2.1.1, 2.2.0
    • Component/s: SQL
    • Labels:
      None

      Description

      `NaNvl(float value, null)` will be converted into `NaNvl(float value, Cast(null, DoubleType))` and finally `NaNvl(Cast(float value, DoubleType), Cast(null, DoubleType))`.

      This will cause mismatching in the output type when the input type is float.

      By adding extra rule in TypeCoercion can resolve this issue.

        Attachments

          Activity

            People

            • Assignee:
              dbtsai DB Tsai
              Reporter:
              dbtsai DB Tsai
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: