amaliujia commented on code in PR #40651:
URL: https://github.com/apache/spark/pull/40651#discussion_r1160021169


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/percentiles.scala:
##########
@@ -154,12 +155,7 @@ abstract class PercentileBase
       return Seq.empty
     }
 
-    val ordering = child.dataType match {
-      case numericType: NumericType => numericType.ordering
-      case intervalType: YearMonthIntervalType => intervalType.ordering
-      case intervalType: DayTimeIntervalType => intervalType.ordering
-      case otherType => QueryExecutionErrors.unsupportedTypeError(otherType)
-    }
+    val ordering = PhysicalDataType.ordering(child.dataType)

Review Comment:
   Can we try to drop `InternalType` in the last thus try to make `Ordering` 
and all others to just be `ANY`?
   
   Right now I still expect to move `Numeric`, `Integral` etc. which looks like 
use `InternalType`. After smoothly moving those things I plan to drop 
`InternalType` at once and make everything `ANY`. However now it is more easier 
to keep the original code as much as possible.



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