Github user JoshRosen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/7849#discussion_r36036129
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/SortPrefixUtils.scala ---
    @@ -46,4 +47,19 @@ object SortPrefixUtils {
           case _ => NoOpPrefixComparator
         }
       }
    +
    +  def getPrefixComparator(schema: StructType): PrefixComparator = {
    +    val field = schema.head
    +    getPrefixComparator(SortOrder(BoundReference(0, field.dataType, 
field.nullable), Ascending))
    --- End diff --
    
    Do we want to hardcode `Ascending` here? I realize that we only need to 
cluster, not sort, for aggregation, but in terms of API design maybe it would 
be clearer to fix `Ascending` in the KV sorter than here. If our KV sorter 
technically performs clustering instead of sorting then maybe we should add a 
comment to make that very explicit. 


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

Reply via email to