Github user davies commented on a diff in the pull request:
https://github.com/apache/spark/pull/12490#discussion_r60275221
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/SortPrefixUtils.scala ---
@@ -66,6 +66,29 @@ object SortPrefixUtils {
}
/**
+ * Returns whether the specified SortOrder can be satisfied with a radix
sort on the prefix.
+ */
+ def canSortFullyWithPrefix(sortOrder: SortOrder): Boolean = {
+ sortOrder.dataType match {
+ case BooleanType | ByteType | ShortType | IntegerType | LongType |
DateType | TimestampType =>
--- End diff --
Because prefix is not nullable, so one minimum value is chosen to represent
`null`. For LongType, by only compare the prefix, it can't tell the value is
`null` or the minimum value (Long.MinValue). This may also apply to DecimalType
and DoubleType
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]