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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0.0, 2.0.1, 2.0.2, 2.1.0
    • 2.0.3, 2.1.1, 2.2.0
    • SQL
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: