GitHub user tashoyan opened a pull request:

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

    [SPARK-23693][SQL] Functions to generate UUIDs

    ## What changes were proposed in this pull request?
    
    The following functions are implemented and available in the `functions` 
object of SQL API:
    
    - time_based_uuid()
    - random_based_uuid()
    
    UUIDs are generated with help of 
[java-uuid-generator](https://github.com/cowtowncoder/java-uuid-generator).
    
    This PR replaces a custom random-based UUID generator that previously was 
used in some parts of the code. In addition, it provides a new function for 
time-based UUIDs.
    For backward compatibility, the new `random_based_uuid()` functions 
produces same UUID values for retries on the same data set. Thus, the new 
function is consistent with the legacy `uuid()` function.
    
    ## How was this patch tested?
    
    Unit tests on the new functions as well as on SQL expressions implementing 
these functions.

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

    $ git pull https://github.com/tashoyan/spark SPARK-23693

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

    https://github.com/apache/spark/pull/21055.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 #21055
    
----
commit 37fb2f5730fdf52987873367e057fce48810a6c3
Author: Arseniy Tashoyan <tashoyan@...>
Date:   2018-04-10T20:32:22Z

    [SPARK-23693][SQL] Implement time_based_uuid() function

commit df5124aa1edc047fe2977bcf8eb2e1f6a1e842a1
Author: Arseniy Tashoyan <tashoyan@...>
Date:   2018-04-11T05:57:22Z

    Follow updates in the contract

commit 71481e55f4d5ca0547280c958bef625d2e9373b1
Author: Arseniy Tashoyan <tashoyan@...>
Date:   2018-04-11T20:50:28Z

    [SPARK-23693][SQL] Implement random_based_uuid() function

commit 9e45a87a90d81197e677790b7b94c8526d29f635
Author: Arseniy Tashoyan <tashoyan@...>
Date:   2018-04-11T21:08:54Z

    [SPARK-23693][SQL] Refactor: Extract common functions for UUID SQL 
expressions to an abstract superclass

commit 931a737be7c0ee8c0de1da8fcb546e8d87056efc
Author: Arseniy Tashoyan <tashoyan@...>
Date:   2018-04-11T21:14:59Z

    [SPARK-23693][SQL] Annotate UUID expressions with @ExpressionDescription

commit 1ff072cd0506bd28c0b303d14f4fd7f6c30a69fb
Author: Arseniy Tashoyan <tashoyan@...>
Date:   2018-04-11T22:18:41Z

    [SPARK-23693][SQL] Fix random-based UUID: must give same values for retries 
on the same data frame

commit 19c91c5ade5330c4127112dc902da3996e42fffd
Author: Arseniy Tashoyan <tashoyan@...>
Date:   2018-04-11T22:21:43Z

    [SPARK-23693][SQL] Switch to new implementation of random-based UUIDs

commit 117538be5c87017917c9e9c1ea25432142393925
Author: Arseniy Tashoyan <tashoyan@...>
Date:   2018-04-11T22:25:08Z

    [SPARK-23693][SQL] Fix code style violation

commit ee850d9244ba4bcc8e8a21fd669a98082a9be08e
Author: Arseniy Tashoyan <tashoyan@...>
Date:   2018-04-11T22:28:06Z

    [SPARK-23693][SQL] Cleanup code

commit 1f3b700e90c512afb31f28eec2d07462c633cbd7
Author: Arseniy Tashoyan <tashoyan@...>
Date:   2018-04-11T22:33:37Z

    [SPARK-23693][SQL] For UUID functions, document behavior on retries

commit bcb086f9940da2b26a34ae73553fc6924d587ec2
Author: Arseniy Tashoyan <tashoyan@...>
Date:   2018-04-11T22:40:02Z

    [SPARK-23693][SQL] Remove unused code related to old UUID implementation

commit 878c0070cbbdce8ef6c2690605dab0362eb8027e
Author: Arseniy Tashoyan <tashoyan@...>
Date:   2018-04-12T08:21:19Z

    Merge remote-tracking branch 'upstream/master' into SPARK-23693

commit 542dbdefb4ff99bbb1c7caedab2f23a6914de0f2
Author: Arseniy Tashoyan <tashoyan@...>
Date:   2018-04-12T11:14:44Z

    [SPARK-23693][SQL] Switch to new implementation of random-based UUIDs

commit d9c560c26cb256693f6e8879f875382d41959a3e
Author: Arseniy Tashoyan <tashoyan@...>
Date:   2018-04-12T16:09:33Z

    [SPARK-23693][SQL] Javadoc conventions

commit 77e65d8cfa07a5eca7890ffc12bbed917312a35f
Author: Arseniy Tashoyan <tashoyan@...>
Date:   2018-04-12T16:11:29Z

    Merge remote-tracking branch 'upstream/master' into SPARK-23693

----


---

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

Reply via email to