You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by wangyum <gi...@git.apache.org> on 2017/05/28 09:12:04 UTC

[GitHub] spark pull request #18136: [SPARK-20910][SQL] Add build-int SQL function - U...

GitHub user wangyum opened a pull request:

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

    [SPARK-20910][SQL] Add build-int SQL function - UUID

    ## What changes were proposed in this pull request?
    
    Add build-int SQL function - UUID.
    
    ## How was this patch tested?
    
    unit tests

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

    $ git pull https://github.com/wangyum/spark SPARK-20910

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

    https://github.com/apache/spark/pull/18136.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 #18136
    
----
commit e82296a6f22252f0ed5a0d8c80b417f85d9c2bcb
Author: Yuming Wang <wg...@gmail.com>
Date:   2017-05-28T09:09:50Z

    Add build-int SQL function - UUID

----


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18136: [SPARK-20910][SQL] Add build-int SQL function - UUID

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/18136
  
    **[Test build #77620 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/77620/testReport)** for PR 18136 at commit [`d19ccca`](https://github.com/apache/spark/commit/d19cccadbaf63ab6ea34050ba1dcedd70ee7a90c).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #18136: [SPARK-20910][SQL] Add build-int SQL function - U...

Posted by viirya <gi...@git.apache.org>.
Github user viirya commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18136#discussion_r119525358
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/misc.scala ---
    @@ -104,3 +107,28 @@ case class CurrentDatabase() extends LeafExpression with Unevaluable {
       override def nullable: Boolean = false
       override def prettyName: String = "current_database"
     }
    +
    +// scalastyle:off line.size.limit
    +@ExpressionDescription(
    +  usage = "_FUNC_() - Returns a universally unique identifier (UUID) string. The value is returned as a canonical UUID 36-character string.",
    --- End diff --
    
    nit: ... an universally ...


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18136: [SPARK-20910][SQL] Add build-int SQL function - UUID

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/18136
  
    **[Test build #77484 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/77484/testReport)** for PR 18136 at commit [`e82296a`](https://github.com/apache/spark/commit/e82296a6f22252f0ed5a0d8c80b417f85d9c2bcb).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds the following public classes _(experimental)_:
      * `case class Uuid() extends LeafExpression with CodegenFallback `


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18136: [SPARK-20910][SQL] Add build-int SQL function - UUID

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18136
  
    Merged build finished. Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18136: [SPARK-20910][SQL] Add build-int SQL function - UUID

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18136
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/77484/
    Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18136: [SPARK-20910][SQL] Add build-in SQL function - UUID

Posted by ueshin <gi...@git.apache.org>.
Github user ueshin commented on the issue:

    https://github.com/apache/spark/pull/18136
  
    Thanks! Merging to master.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18136: [SPARK-20910][SQL] Add build-int SQL function - UUID

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/18136
  
    **[Test build #77613 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/77613/testReport)** for PR 18136 at commit [`46cd181`](https://github.com/apache/spark/commit/46cd1816882d4527909d575507510693452645c2).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18136: [SPARK-20910][SQL] Add build-in SQL function - UUID

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18136
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/77626/
    Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18136: [SPARK-20910][SQL] Add build-int SQL function - UUID

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/18136
  
    **[Test build #77484 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/77484/testReport)** for PR 18136 at commit [`e82296a`](https://github.com/apache/spark/commit/e82296a6f22252f0ed5a0d8c80b417f85d9c2bcb).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18136: [SPARK-20910][SQL] Add build-int SQL function - UUID

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18136
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/77593/
    Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18136: [SPARK-20910][SQL] Add build-in SQL function - UUID

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/18136
  
    **[Test build #77626 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/77626/testReport)** for PR 18136 at commit [`fe18a1d`](https://github.com/apache/spark/commit/fe18a1dd7ca12f940871ba55a5c917a5f6d2ca49).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18136: [SPARK-20910][SQL] Add build-int SQL function - UUID

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18136
  
    Merged build finished. Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18136: [SPARK-20910][SQL] Add build-int SQL function - UUID

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/18136
  
    **[Test build #77593 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/77593/testReport)** for PR 18136 at commit [`953b40d`](https://github.com/apache/spark/commit/953b40deb23344dadeff34a17f0b9ba3df1b6333).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds the following public classes _(experimental)_:
      * `case class Uuid() extends LeafExpression `


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #18136: [SPARK-20910][SQL] Add build-int SQL function - U...

Posted by ueshin <gi...@git.apache.org>.
Github user ueshin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18136#discussion_r119515971
  
    --- Diff: sql/core/src/test/resources/sql-tests/inputs/string-functions.sql ---
    @@ -14,4 +14,4 @@ select replace('abc', 'b', '123');
     select replace('abc', 'b');
     
     -- uuid
    -select length(uuid()), (uuid() <> uuid());
    --- End diff --
    
    Ah, yes, thank you for supporting.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18136: [SPARK-20910][SQL] Add build-int SQL function - UUID

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18136
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/77613/
    Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18136: [SPARK-20910][SQL] Add build-in SQL function - UUID

Posted by hvanhovell <gi...@git.apache.org>.
Github user hvanhovell commented on the issue:

    https://github.com/apache/spark/pull/18136
  
    I just came across this expression and I have a few concerns:
    
    1. A row will not get the same UUID assigned when a task fails. This might cause some really weird problems when the UUID column is used later-on.
    2. UUID.randomString() uses a lot of synchronization in the background. This might make it pretty slow.
    
    Shall I file a ticket?


---

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


[GitHub] spark issue #18136: [SPARK-20910][SQL] Add build-int SQL function - UUID

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18136
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/77620/
    Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18136: [SPARK-20910][SQL] Add build-int SQL function - UUID

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/18136
  
    **[Test build #77613 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/77613/testReport)** for PR 18136 at commit [`46cd181`](https://github.com/apache/spark/commit/46cd1816882d4527909d575507510693452645c2).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #18136: [SPARK-20910][SQL] Add build-int SQL function - U...

Posted by viirya <gi...@git.apache.org>.
Github user viirya commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18136#discussion_r119515739
  
    --- Diff: sql/core/src/test/resources/sql-tests/inputs/string-functions.sql ---
    @@ -14,4 +14,4 @@ select replace('abc', 'b', '123');
     select replace('abc', 'b');
     
     -- uuid
    -select length(uuid()), (uuid() <> uuid());
    --- End diff --
    
    I think what @ueshin means is we should set `deterministic = false` for `Uuid` expression.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #18136: [SPARK-20910][SQL] Add build-int SQL function - U...

Posted by ueshin <gi...@git.apache.org>.
Github user ueshin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18136#discussion_r119512921
  
    --- Diff: sql/core/src/test/resources/sql-tests/inputs/string-functions.sql ---
    @@ -14,4 +14,4 @@ select replace('abc', 'b', '123');
     select replace('abc', 'b');
     
     -- uuid
    -select length(uuid()), (uuid() <> uuid());
    --- End diff --
    
    This test should work if `Uuid` is `deterministic = false`.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18136: [SPARK-20910][SQL] Add build-int SQL function - UUID

Posted by viirya <gi...@git.apache.org>.
Github user viirya commented on the issue:

    https://github.com/apache/spark/pull/18136
  
    LGTM


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18136: [SPARK-20910][SQL] Add build-int SQL function - UUID

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/18136
  
    **[Test build #77626 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/77626/testReport)** for PR 18136 at commit [`fe18a1d`](https://github.com/apache/spark/commit/fe18a1dd7ca12f940871ba55a5c917a5f6d2ca49).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18136: [SPARK-20910][SQL] Add build-int SQL function - UUID

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/18136
  
    **[Test build #77593 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/77593/testReport)** for PR 18136 at commit [`953b40d`](https://github.com/apache/spark/commit/953b40deb23344dadeff34a17f0b9ba3df1b6333).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18136: [SPARK-20910][SQL] Add build-int SQL function - UUID

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18136
  
    Merged build finished. Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18136: [SPARK-20910][SQL] Add build-int SQL function - UUID

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/18136
  
    **[Test build #77620 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/77620/testReport)** for PR 18136 at commit [`d19ccca`](https://github.com/apache/spark/commit/d19cccadbaf63ab6ea34050ba1dcedd70ee7a90c).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #18136: [SPARK-20910][SQL] Add build-in SQL function - UU...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

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


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18136: [SPARK-20910][SQL] Add build-int SQL function - UUID

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18136
  
    Merged build finished. Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #18136: [SPARK-20910][SQL] Add build-int SQL function - U...

Posted by kiszk <gi...@git.apache.org>.
Github user kiszk commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18136#discussion_r119409458
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/misc.scala ---
    @@ -104,3 +107,26 @@ case class CurrentDatabase() extends LeafExpression with Unevaluable {
       override def nullable: Boolean = false
       override def prettyName: String = "current_database"
     }
    +
    +// scalastyle:off line.size.limit
    +@ExpressionDescription(
    +  usage = "_FUNC_() - Returns a universally unique identifier (UUID) string. The value is returned as a canonical UUID 36-character string.",
    +  extended = """
    +    Examples:
    +      > SELECT _FUNC_();
    +       46707d92-02f4-4817-8116-a4c3b23e6266
    +  """)
    +// scalastyle:on line.size.limit
    +case class Uuid() extends LeafExpression {
    +
    +  override def nullable: Boolean = false
    +
    +  override def dataType: DataType = StringType
    +
    +  override def eval(input: InternalRow): Any = UTF8String.fromString(UUID.randomUUID().toString)
    +
    +  override def doGenCode(ctx: CodegenContext, ev: ExprCode): ExprCode = {
    +    ev.copy(code = s"final ${ctx.javaType(dataType)} ${ev.value} = " +
    --- End diff --
    
    nit: ${ctx.javaType(dataType)} -> UTF8String


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18136: [SPARK-20910][SQL] Add build-int SQL function - UUID

Posted by ueshin <gi...@git.apache.org>.
Github user ueshin commented on the issue:

    https://github.com/apache/spark/pull/18136
  
    LGTM, pending tests.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #18136: [SPARK-20910][SQL] Add build-int SQL function - U...

Posted by ueshin <gi...@git.apache.org>.
Github user ueshin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18136#discussion_r118855831
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/misc.scala ---
    @@ -104,3 +107,25 @@ case class CurrentDatabase() extends LeafExpression with Unevaluable {
       override def nullable: Boolean = false
       override def prettyName: String = "current_database"
     }
    +
    +// scalastyle:off line.size.limit
    +@ExpressionDescription(
    +  usage = "_FUNC_() - Returns a universally unique identifier (UUID) string. The value is returned as a canonical UUID 36-character string.",
    +  extended = """
    +    Examples:
    +      > SELECT _FUNC_();
    +       46707d92-02f4-4817-8116-a4c3b23e6266
    +  """)
    +// scalastyle:on line.size.limit
    +case class Uuid() extends LeafExpression with CodegenFallback {
    +  override def foldable: Boolean = true
    --- End diff --
    
    I don't think this function is foldable. If this is foldable, it means we might use the same UUID generated by optimizer for all rows.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18136: [SPARK-20910][SQL] Add build-in SQL function - UUID

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18136
  
    Merged build finished. Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #18136: [SPARK-20910][SQL] Add build-int SQL function - U...

Posted by ueshin <gi...@git.apache.org>.
Github user ueshin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18136#discussion_r118855760
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/misc.scala ---
    @@ -104,3 +107,25 @@ case class CurrentDatabase() extends LeafExpression with Unevaluable {
       override def nullable: Boolean = false
       override def prettyName: String = "current_database"
     }
    +
    +// scalastyle:off line.size.limit
    +@ExpressionDescription(
    +  usage = "_FUNC_() - Returns a universally unique identifier (UUID) string. The value is returned as a canonical UUID 36-character string.",
    +  extended = """
    +    Examples:
    +      > SELECT _FUNC_();
    +       46707d92-02f4-4817-8116-a4c3b23e6266
    +  """)
    +// scalastyle:on line.size.limit
    +case class Uuid() extends LeafExpression with CodegenFallback {
    --- End diff --
    
    Can you implement codegen for this?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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