You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "HyukjinKwon (via GitHub)" <gi...@apache.org> on 2023/11/20 01:40:35 UTC

Re: [PR] [MINOR][DOCS] Clarify sort behaviour for structs [spark]

HyukjinKwon commented on code in PR #43871:
URL: https://github.com/apache/spark/pull/43871#discussion_r1398565942


##########
python/pyspark/sql/functions.py:
##########
@@ -14102,7 +14102,7 @@ def sort_array(col: "ColumnOrName", asc: bool = True) -> Column:
     Collection function: sorts the input array in ascending or descending order according
     to the natural ordering of the array elements. Null elements will be placed at the beginning
     of the returned array in ascending order or at the end of the returned array in descending
-    order.
+    order. The natural order of a struct is the natural order of the first field in the struct schema.

Review Comment:
   Oh, so it doesn't sort by the second field?



-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org