Github user cloud-fan commented on the issue:

    https://github.com/apache/spark/pull/19916
  
    > I think a lot of caller-side changes would be needed as well, since now 
we are not passing any variable name
    
    I mean something like
    ```
    def addReferenceObj(name: String, obj: Any, className: String = null): 
String = {
      val idx = references.length
      references += obj
      val clsName = Option(className).getOrElse(obj.getClass.getName)
      val comment = Option(name).map(n => s"/* $name */").getOrElse("")
        s"(($clsName) references[$idx] $comment)"
      }
    
    def addReferenceMinorObj(obj: Any, className: String = null): String = {
      addReferenceObj(name = null, obj, className)
    } 
    ```
    
    Then no caller side change is needed.
    
    In the future we can also remove `addReferenceMinorObj` as it's always 
better to have a name.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to