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

LEAST doesn't accept numeric arguments with different data types

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0.0
    • 2.0.1, 2.1.0
    • SQL
    • None

    Description

      SELECT LEAST(1, 1.5);
      
      Error: org.apache.spark.sql.AnalysisException: cannot resolve 'least(1, CAST(2.1 AS DECIMAL(2,1)))' due to data type mismatch: The expressions should all have the same type, got LEAST (ArrayBuffer(IntegerType, DecimalType(2,1))).; line 1 pos 7 (state=,code=0)
      

      This query works for 1.6.

      Attachments

        Activity

          People

            cloud_fan Wenchen Fan
            lian cheng Cheng Lian
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: