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

Constant argument expecting Hive UDAFs doesn't work

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.2.0
    • 2.3.3, 2.4.0
    • SQL
    • None

    Description

       The following doesn't work since SPARK-18186 so it is a regression.

      test("constant argument expecting Hive UDAF") {
        withTempView("inputTable") {
          spark.range(10).createOrReplaceTempView("inputTable")
          withUserDefinedFunction("testGenericUDAFPercentileApprox" -> false) {
            val numFunc = spark.catalog.listFunctions().count()
            sql(s"CREATE FUNCTION testGenericUDAFPercentileApprox AS '" +
              s"${classOf[GenericUDAFPercentileApprox].getName}'")
            checkAnswer(
              sql("SELECT testGenericUDAFPercentileApprox(id, 0.5) FROM inputTable"),
              Seq(Row(4.0)))
          }
        }
      }
      
      

       

      Attachments

        Activity

          People

            petertoth Peter Toth
            petertoth Peter Toth
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: