You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Takuya Ueshin (Jira)" <ji...@apache.org> on 2022/06/08 23:09:00 UTC
[jira] [Created] (SPARK-39419) When the comparator of ArraySort returns null, it should fail.
Takuya Ueshin created SPARK-39419:
-------------------------------------
Summary: 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
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-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org