maropu commented on a change in pull request #26681: [SPARK-30048][SQL] Enable 
aggregates with interval type values for RelationalGroupedDataset
URL: https://github.com/apache/spark/pull/26681#discussion_r350737756
 
 

 ##########
 File path: 
sql/core/src/main/scala/org/apache/spark/sql/RelationalGroupedDataset.scala
 ##########
 @@ -98,10 +98,10 @@ class RelationalGroupedDataset protected[sql](
       // Make sure all specified columns are numeric.
       colNames.map { colName =>
         val namedExpr = df.resolve(colName)
-        if (!namedExpr.dataType.isInstanceOf[NumericType]) {
+        if 
(!TypeCollection.NumericAndInterval.acceptsType(namedExpr.dataType)) {
 
 Review comment:
   Can you update the comment to make it more general one?
   
https://github.com/apache/spark/blob/c2d513f8e9f5d96dae7990325617013bcc92fe5d/sql/catalyst/src/main/scala/org/apache/spark/sql/types/AbstractDataType.scala#L82

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to