cloud-fan commented on a change in pull request #34352:
URL: https://github.com/apache/spark/pull/34352#discussion_r733476604



##########
File path: sql/core/src/test/scala/org/apache/spark/sql/UDFSuite.scala
##########
@@ -50,6 +51,20 @@ private case class FunctionResult(f1: String, f2: String)
 private case class LocalDateInstantType(date: LocalDate, instant: Instant)
 private case class TimestampInstantType(t: Timestamp, instant: Instant)
 
+class MyDoubleAverage extends Aggregator[jlDouble, (Double, Long), jlDouble] {

Review comment:
       There are a few more stuff I'd like to test:
   1. What if the class has type parameters? e.g. `class TypedCount[IN](val f: 
IN => Any) extends Aggregator[IN, Long, Long]`. What happens if we register it 
as a SQL UDAF?
   2. Let's test negative cases, e.g., wrong num of parameters, wrong parameter 
types.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to