GitHub user mgaido91 opened a pull request:

    https://github.com/apache/spark/pull/21080

    [SPARK-23986][SQL] freshName can generate non-unique names

    ## What changes were proposed in this pull request?
    
    We are using `CodegenContext.freshName` to get a unique name for any new 
variable we are adding. Unfortunately, this method currently fails to create a 
unique name when we request more than one instance of variables with starting 
name `name1` and an instance with starting name `name11`.
    
    The PR changes the way a new name is generated by 
`CodegenContext.freshName` so that we generate unique names in this scenario 
too.
    
    ## How was this patch tested?
    
    added UT


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/mgaido91/spark SPARK-23986

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/21080.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #21080
    
----
commit 8623918adf88609f8a4e0ad6b69ad5c1d54bdc86
Author: Marco Gaido <marcogaido91@...>
Date:   2018-04-16T12:58:02Z

    [SPARK-23986][SQL] freshName can generate non-unique names

----


---

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

Reply via email to