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

If the input parameter is float type for ceil or floor ,the result is not we expected

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.1.0, 2.2.0
    • 2.3.0
    • SQL
    • None

    Description

      spark-sql>SELECT ceil(cast(12345.1233 as float));
      spark-sql>12345
      For this case, the result we expected is 12346

      spark-sql>SELECT floor(cast(-12345.1233 as float));
      spark-sql>-12345
      For this case, the result we expected is -12346

      Attachments

        Activity

          People

            10110346 liuxian
            10110346 liuxian
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: