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

    https://github.com/apache/spark/pull/13527#discussion_r66882709
  
    --- Diff: core/src/main/scala/org/apache/spark/util/Utils.scala ---
    @@ -2305,6 +2305,23 @@ private[spark] object Utils extends Logging {
         log.info(s"Started daemon with process name: 
${Utils.getProcessName()}")
         SignalUtils.registerLogger(log)
       }
    +
    +  /**
    +  * Unions two comma-separated lists of files.
    +  */
    +  def setUnionFileLists(leftList: String, rightList: String): Set[String] 
= {
    +    val leftSet = if (leftList == "" || leftList == null) {
    --- End diff --
    
    If you use `Option[String]` as the argument you can avoid this and the 
`getOrElse` calls in SparkCOntext, and do something like:
    
    ```
    var allFiles = Set[String]()
    
    list.foreach { value => allFiles ++= value.split(",") }
    ```
    
    Which is a lot shorter than the code you have.


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