[ https://issues.apache.org/jira/browse/SPARK-39419?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17552912#comment-17552912 ]
Apache Spark commented on SPARK-39419: -------------------------------------- User 'ueshin' has created a pull request for this issue: https://github.com/apache/spark/pull/36835 > When the comparator of ArraySort returns null, it should fail. > -------------------------------------------------------------- > > Key: SPARK-39419 > URL: https://issues.apache.org/jira/browse/SPARK-39419 > Project: Spark > Issue Type: Bug > Components: SQL > Affects Versions: 3.3.0 > Reporter: Takuya Ueshin > Priority: Major > > When the comparator of {{ArraySort}} returns {{null}}, currently it handles > it as {{0}} (equal). > According to the doc, > {quote} > It returns -1, 0, or 1 as the first element is less than, equal to, or > greater than the second element. If the comparator function returns other > values (including null), the function will fail and raise an error. > {quote} > It's fine to return non -1, 0, 1 integers to follow the Java convention > (still need to update the doc, though), but it should throw an exception for > {{null}} result. -- This message was sent by Atlassian Jira (v8.20.7#820007) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org