HyukjinKwon commented on code in PR #43805:
URL: https://github.com/apache/spark/pull/43805#discussion_r1393545050
##########
sql/api/src/main/scala/org/apache/spark/sql/catalyst/expressions/OrderUtils.scala:
##########
@@ -16,15 +16,16 @@
*/
package org.apache.spark.sql.catalyst.expressions
-import org.apache.spark.sql.types.{ArrayType, AtomicType, DataType, NullType,
StructType, UserDefinedType}
+import org.apache.spark.sql.types.{ArrayType, AtomicType,
CalendarIntervalType, DataType, NullType, StructType, UserDefinedType}
object OrderUtils {
/**
* Returns true iff the data type can be ordered (i.e. can be sorted).
*/
def isOrderable(dataType: DataType): Boolean = dataType match {
case NullType => true
- case dt: AtomicType => true
+ case _: AtomicType => true
+ case _: CalendarIntervalType => true
Review Comment:
I think actually YearMonthIntervalType and DayTimeIntervalType are orderable
too. Also should probably file a separate JIRA because 1. the change was there
even before https://github.com/apache/spark/pull/42092 and 2. we can't reuse
the JIRA as 3.5.0 is already released out.
##########
sql/api/src/main/scala/org/apache/spark/sql/catalyst/expressions/OrderUtils.scala:
##########
@@ -16,15 +16,16 @@
*/
package org.apache.spark.sql.catalyst.expressions
-import org.apache.spark.sql.types.{ArrayType, AtomicType, DataType, NullType,
StructType, UserDefinedType}
+import org.apache.spark.sql.types.{ArrayType, AtomicType,
CalendarIntervalType, DataType, NullType, StructType, UserDefinedType}
object OrderUtils {
/**
* Returns true iff the data type can be ordered (i.e. can be sorted).
*/
def isOrderable(dataType: DataType): Boolean = dataType match {
case NullType => true
- case dt: AtomicType => true
+ case _: AtomicType => true
+ case _: CalendarIntervalType => true
Review Comment:
cc @MaxGekk FYI
--
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]