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

"Percentile" needs explicit cast to double

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0.0
    • 2.0.0
    • SQL
    • None

    Description

      select percentile(cast(id as bigint), cast(0.5 as double)) from temp.bla

      Works.

      select percentile(cast(id as bigint), 0.5 ) from temp.bla

      Throws

      Error in query: No handler for Hive UDF 'org.apache.hadoop.hive.ql.udf.UDAFPercentile': org.apache.hadoop.hive.ql.exec.NoMatchingMethodException: No matching method for class org.apache.hadoop.hive.ql.udf.UDAFPercentile with (bigint, decimal(38,18)). Possible choices: FUNC(bigint, array<double>) FUNC(bigint, double) ; line 1 pos 7

      Attachments

        Activity

          People

            dongjoon Dongjoon Hyun
            epahomov Egor Pahomov
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: