You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Simeon Simeonov (Jira)" <ji...@apache.org> on 2022/01/01 23:44:00 UTC
[jira] [Created] (SPARK-37800) TreeNode.argString incorrectly formats arguments of type Set[_]
Simeon Simeonov created SPARK-37800:
---------------------------------------
Summary: TreeNode.argString incorrectly formats arguments of type Set[_]
Key: SPARK-37800
URL: https://issues.apache.org/jira/browse/SPARK-37800
Project: Spark
Issue Type: Bug
Components: Spark Core
Affects Versions: 3.2.0
Reporter: Simeon Simeonov
The implementation of {{argString}} uses the following pattern for sets:
{code:java}
case set: Set[_] =>
// Sort elements for deterministic behaviours
val sortedSeq = set.toSeq.map(formatArg(_, maxFields).sorted)
truncatedString(sortedSeq, "{", ", ", "}", maxFields) :: Nil {code}
Instead of sorting the elements of the set, the implementation sorts the characters of the strings that {{formatArg}} returns.
The fix is simply to move the closing parenthesis to the correct location:
{code:java}
val sortedSeq = set.toSeq.map(formatArg(_, maxFields)).sorted
{code}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org