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

[Spark SQL] [UDF] the ceil/ceiling function got wrong return value type

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.0
    • Fix Version/s: 1.6.0
    • Component/s: SQL
    • Labels:
      None

      Description

      As per ceil/ceiling definition,it should get BIGINT return value
      -ceil(DOUBLE a), ceiling(DOUBLE a)
      -Returns the minimum BIGINT value that is equal to or greater than a.

      But in current Spark implementation, it got wrong value type.
      e.g.,
      select ceil(2642.12) from udf_test_web_sales limit 1;
      2643.0

      In hive implementation, it got return value type like below:
      hive> select ceil(2642.12) from udf_test_web_sales limit 1;
      OK
      2643

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                chenghao Cheng Hao
                Reporter:
                jameszhouyi Yi Zhou
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: