You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by yhuai <gi...@git.apache.org> on 2015/11/13 21:26:17 UTC

[GitHub] spark pull request: [SPARK-11736] [SQL] Add monotonically_increasi...

GitHub user yhuai opened a pull request:

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

    [SPARK-11736] [SQL] Add monotonically_increasing_id to function registry.

    https://issues.apache.org/jira/browse/SPARK-11736

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

    $ git pull https://github.com/yhuai/spark MonotonicallyIncreasingID

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

    https://github.com/apache/spark/pull/9703.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 #9703
    
----
commit d06144236b1f7f4bd8dae5d5bb2d485cfa342299
Author: Yin Huai <yh...@databricks.com>
Date:   2015-11-13T20:25:26Z

    Add monotonically_increasing_id to function registry.

----


---
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: [SPARK-11736] [SQL] Add monotonically_increasi...

Posted by rxin <gi...@git.apache.org>.
Github user rxin commented on the pull request:

    https://github.com/apache/spark/pull/9703#issuecomment-156781368
  
    I've merged this in master and branch-1.6.



---
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: [SPARK-11736] [SQL] Add monotonically_increasi...

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

    https://github.com/apache/spark/pull/9703#discussion_r44866181
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/ColumnExpressionSuite.scala ---
    @@ -563,6 +563,10 @@ class ColumnExpressionSuite extends QueryTest with SharedSQLContext {
           df.select(monotonicallyIncreasingId()),
           Row(0L) :: Row(1L) :: Row((1L << 33) + 0L) :: Row((1L << 33) + 1L) :: Nil
         )
    +    checkAnswer(
    +      df.select(expr("monotonically_increasing_id()")),
    --- End diff --
    
    i was going to suggest just merging the two cases into one, but this works too.


---
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: [SPARK-11736] [SQL] Add monotonically_increasi...

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

    https://github.com/apache/spark/pull/9703#issuecomment-156775574
  
    **[Test build #45941 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/45941/consoleFull)** for PR 9703 at commit [`bc4eb96`](https://github.com/apache/spark/commit/bc4eb96703782b2f15c78d84c01b048e67c0575f).
     * 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: [SPARK-11736] [SQL] Add monotonically_increasi...

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

    https://github.com/apache/spark/pull/9703#issuecomment-156775586
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/45941/
    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: [SPARK-11736] [SQL] Add monotonically_increasi...

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

    https://github.com/apache/spark/pull/9703#issuecomment-156581528
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/45888/
    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: [SPARK-11736] [SQL] Add monotonically_increasi...

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

    https://github.com/apache/spark/pull/9703#issuecomment-156581386
  
    **[Test build #45888 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/45888/consoleFull)** for PR 9703 at commit [`d061442`](https://github.com/apache/spark/commit/d06144236b1f7f4bd8dae5d5bb2d485cfa342299).
     * 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: [SPARK-11736] [SQL] Add monotonically_increasi...

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

    https://github.com/apache/spark/pull/9703#issuecomment-156549573
  
    **[Test build #45888 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/45888/consoleFull)** for PR 9703 at commit [`d061442`](https://github.com/apache/spark/commit/d06144236b1f7f4bd8dae5d5bb2d485cfa342299).


---
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: [SPARK-11736] [SQL] Add monotonically_increasi...

Posted by rxin <gi...@git.apache.org>.
Github user rxin commented on the pull request:

    https://github.com/apache/spark/pull/9703#issuecomment-156768947
  
    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 pull request: [SPARK-11736] [SQL] Add monotonically_increasi...

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

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


---
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: [SPARK-11736] [SQL] Add monotonically_increasi...

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

    https://github.com/apache/spark/pull/9703#issuecomment-156581527
  
    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: [SPARK-11736] [SQL] Add monotonically_increasi...

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

    https://github.com/apache/spark/pull/9703#discussion_r44847733
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/ColumnExpressionSuite.scala ---
    @@ -555,14 +555,31 @@ class ColumnExpressionSuite extends QueryTest with SharedSQLContext {
       }
     
       test("monotonicallyIncreasingId") {
    -    // Make sure we have 2 partitions, each with 2 records.
    -    val df = sparkContext.parallelize(Seq[Int](), 2).mapPartitions { _ =>
    -      Iterator(Tuple1(1), Tuple1(2))
    -    }.toDF("a")
    -    checkAnswer(
    -      df.select(monotonicallyIncreasingId()),
    -      Row(0L) :: Row(1L) :: Row((1L << 33) + 0L) :: Row((1L << 33) + 1L) :: Nil
    -    )
    +    {
    +      // Make sure we have 2 partitions, each with 2 records.
    +      val df = sparkContext.parallelize(Seq[Int](), 2).mapPartitions { _ =>
    +        Iterator(Tuple1(1), Tuple1(2))
    +      }.toDF("a")
    +      checkAnswer(
    +        df.select(monotonicallyIncreasingId()),
    +        Row(0L) :: Row(1L) :: Row((1L << 33) + 0L) :: Row((1L << 33) + 1L) :: Nil
    +      )
    +    }
    +
    +    {
    +      withTempTable("monotonicallyIncreasingId") {
    +        // Make sure we have 2 partitions, each with 2 records.
    +        val df = sparkContext.parallelize(Seq[Int](), 2).mapPartitions { _ =>
    +          Iterator(Tuple1(1), Tuple1(2))
    +        }.toDF("a")
    +        df.registerTempTable("monotonicallyIncreasingId")
    +        checkAnswer(
    +          sql("select monotonically_increasing_id() from monotonicallyIncreasingId"),
    --- End diff --
    
    we can just use expr("monotonically_increasing_id()") to simplify the test.



---
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: [SPARK-11736] [SQL] Add monotonically_increasi...

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

    https://github.com/apache/spark/pull/9703#issuecomment-156768860
  
    **[Test build #45941 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/45941/consoleFull)** for PR 9703 at commit [`bc4eb96`](https://github.com/apache/spark/commit/bc4eb96703782b2f15c78d84c01b048e67c0575f).


---
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: [SPARK-11736] [SQL] Add monotonically_increasi...

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

    https://github.com/apache/spark/pull/9703#issuecomment-156775585
  
    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