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

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.0, 2.2.0
    • Fix Version/s: 2.3.0
    • Component/s: SQL
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: