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))) } } }