Github user viirya commented on the issue:

    https://github.com/apache/spark/pull/21520
  
    > 1. We are seeing many inline prefix with a few typical patterns.
    > Can we introduce new APIs to avoid repetations of adding inline, for 
example JavaCode.className(Class[_]): JavaCode for the first call.
    
    @kiszk I initially took a similar approach but found soon that I'd create 
too many APIs. I'm not pretty sure if that is what we want to have distinguish 
them in API level because they are all actually a simple piece of inline string 
in code, so I turned to a `inline` to treat them as same.
    
    > 2. We are seeing many JavaCode.global() or JavaCode.variable() when we 
create a new variable.
    Would it be possible to make them simpler?
    
    Yes, I noticed that too. I was planning to change existing API such as 
`ctx.freshName`. But I leave it as it and set the first goal to pass all tests 
after forbidding string interpolation. Since the tests are passed now, I think 
we can incrementally make the changes more simpler and clear. I've proposed to 
do this part in some smaller PRs (ref: 
https://github.com/apache/spark/pull/21520#issuecomment-396111725). WDYT?
    
    
    
    



---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to