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 2016/07/20 08:57:34 UTC

[GitHub] spark pull request #14284: [SPARK-16633] [SPARK-16642] Fixes three issues re...

GitHub user yhuai opened a pull request:

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

    [SPARK-16633] [SPARK-16642] Fixes three issues related to window functions

    ## What changes were proposed in this pull request?
    This PR contains three changes. 
    
    First, this PR changes the behavior of lead/lag back to Spark 1.6's behavior, which is described as below:
    1. lead/lag respect null input values, which means that if the offset row exists and the input value is null, the result will be null instead of the default value.
    2. If the offset row does not exist, the default value will be used.
    3. OffsetWindowFunction's nullable setting also considers the nullability of its input (because of the first change).
    
    Second, this PR fixes the evaluation of lead/lag when the input expression is a literal. This fix is a result of the first change. In current master, if a literal is used as the input expression of a lead or lag function, the result will be this literal even if the offset row does not exist.
    
    Third, this PR makes ResolveWindowFrame not fire if a window function is not resolved.
    
    ## How was this patch tested?
    New tests in SQLWindowFunctionSuite

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

    $ git pull https://github.com/yhuai/spark lead-lag

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

    https://github.com/apache/spark/pull/14284.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 #14284
    
----
commit 78e69018ecaffb9598f4ea2b51900850ee3fb988
Author: Yin Huai <yh...@databricks.com>
Date:   2016-07-20T06:56:50Z

    Add regression tests

commit da5f36f5daa16c4aba605cb939b313c92274b24e
Author: Yin Huai <yh...@databricks.com>
Date:   2016-07-20T07:22:17Z

    Fix SPARK-16642

commit 02ee1915ab2519c876f60162ff00aaa155142eec
Author: Yin Huai <yh...@databricks.com>
Date:   2016-07-20T08:43:04Z

    OffsetWindowFunction's nullable should also check its input's nullable field.

commit 506393b3eec45f7b62615adfe317a230e8de4128
Author: Yin Huai <yh...@databricks.com>
Date:   2016-07-20T08:43:28Z

    Change the behavior of lead/lag back to Spark 1.6's behavior, which is explained below:
    * When the offset row does not exits, default values will be used.
    * lead/lag always respect null input values.

----


---
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 #14284: [SPARK-16633] [SPARK-16642] Fixes three issues re...

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

    https://github.com/apache/spark/pull/14284#discussion_r71782889
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/execution/SQLWindowFunctionSuite.scala ---
    @@ -357,14 +356,59 @@ class SQLWindowFunctionSuite extends QueryTest with SQLTestUtils with TestHiveSi
       }
     
       test("SPARK-7595: Window will cause resolve failed with self join") {
    -    sql("SELECT * FROM src") // Force loading of src table.
    -
         checkAnswer(sql(
           """
             |with
    -        | v1 as (select key, count(value) over (partition by key) cnt_val from src),
    +        | v0 as (select 0 as key, 1 as value),
    +        | v1 as (select key, count(value) over (partition by key) cnt_val from v0),
             | v2 as (select v1.key, v1_lag.cnt_val from v1, v1 v1_lag where v1.key = v1_lag.key)
    -        | select * from v2 order by key limit 1
    -      """.stripMargin), Row(0, 3))
    +        | select key, cnt_val from v2 order by key limit 1
    +      """.stripMargin), Row(0, 1))
    +  }
    +
    +  test("lead/lag should return the default value if the offset row does not exist") {
    +    checkAnswer(sql(
    +      """
    +        |SELECT
    +        |  lag(123, 100, 321) OVER (ORDER BY id) as lag,
    +        |  lead(123, 100, 321) OVER (ORDER BY id) as lead
    +        |FROM (SELECT 1 as id) tmp
    +      """.stripMargin),
    +      Row(321, 321))
    +
    +    checkAnswer(sql(
    +      """
    +        |SELECT
    +        |  lag(123, 100, a) OVER (ORDER BY id) as lag,
    +        |  lead(123, 100, a) OVER (ORDER BY id) as lead
    +        |FROM (SELECT 1 as id, 2 as a) tmp
    +      """.stripMargin),
    +      Row(2, 2))
    +  }
    +
    +  test("lead/lag should be able to handle null input value correctly") {
    --- End diff --
    
    ok I see what @jaceklaskowski meant. I thought he was questioning the behavior of lead/lag.


---
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 #14284: [SPARK-16633] [SPARK-16642] Fixes three issues re...

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

    https://github.com/apache/spark/pull/14284#discussion_r71781038
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/execution/SQLWindowFunctionSuite.scala ---
    @@ -357,14 +356,59 @@ class SQLWindowFunctionSuite extends QueryTest with SQLTestUtils with TestHiveSi
       }
     
       test("SPARK-7595: Window will cause resolve failed with self join") {
    -    sql("SELECT * FROM src") // Force loading of src table.
    -
         checkAnswer(sql(
           """
             |with
    -        | v1 as (select key, count(value) over (partition by key) cnt_val from src),
    +        | v0 as (select 0 as key, 1 as value),
    +        | v1 as (select key, count(value) over (partition by key) cnt_val from v0),
             | v2 as (select v1.key, v1_lag.cnt_val from v1, v1 v1_lag where v1.key = v1_lag.key)
    -        | select * from v2 order by key limit 1
    -      """.stripMargin), Row(0, 3))
    +        | select key, cnt_val from v2 order by key limit 1
    +      """.stripMargin), Row(0, 1))
    +  }
    +
    +  test("lead/lag should return the default value if the offset row does not exist") {
    +    checkAnswer(sql(
    +      """
    +        |SELECT
    +        |  lag(123, 100, 321) OVER (ORDER BY id) as lag,
    +        |  lead(123, 100, 321) OVER (ORDER BY id) as lead
    +        |FROM (SELECT 1 as id) tmp
    +      """.stripMargin),
    +      Row(321, 321))
    +
    +    checkAnswer(sql(
    +      """
    +        |SELECT
    +        |  lag(123, 100, a) OVER (ORDER BY id) as lag,
    +        |  lead(123, 100, a) OVER (ORDER BY id) as lead
    +        |FROM (SELECT 1 as id, 2 as a) tmp
    +      """.stripMargin),
    +      Row(2, 2))
    +  }
    +
    +  test("lead/lag should be able to handle null input value correctly") {
    --- End diff --
    
    I don't think "correctly" is needed here.


---
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 #14284: [SPARK-16633] [SPARK-16642] Fixes three issues related t...

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

    https://github.com/apache/spark/pull/14284
  
    **[Test build #62593 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/62593/consoleFull)** for PR 14284 at commit [`c2fd2d7`](https://github.com/apache/spark/commit/c2fd2d786f952877cf51f685056b1068c455f776).


---
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 #14284: [SPARK-16633] [SPARK-16642] Fixes three issues re...

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

    https://github.com/apache/spark/pull/14284#discussion_r71598678
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/execution/SQLWindowFunctionSuite.scala ---
    @@ -357,14 +356,59 @@ class SQLWindowFunctionSuite extends QueryTest with SQLTestUtils with TestHiveSi
       }
     
       test("SPARK-7595: Window will cause resolve failed with self join") {
    -    sql("SELECT * FROM src") // Force loading of src table.
    --- End diff --
    
    For this test, I disabled the fix (https://github.com/apache/spark/pull/6114/files) and checked that it does fail the analysis because analyzer fails to resolve conflicting references in Join. So, this test is still valid after my change.


---
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 #14284: [SPARK-16633] [SPARK-16642] [SPARK-16721] [SQL] Fixes th...

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

    https://github.com/apache/spark/pull/14284
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/62854/
    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 #14284: [SPARK-16633] [SPARK-16642] Fixes three issues related t...

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

    https://github.com/apache/spark/pull/14284
  
    **[Test build #62593 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/62593/consoleFull)** for PR 14284 at commit [`c2fd2d7`](https://github.com/apache/spark/commit/c2fd2d786f952877cf51f685056b1068c455f776).
     * This patch **fails Spark unit 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 #14284: [SPARK-16633] [SPARK-16642] [SPARK-16721] [SQL] Fixes th...

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

    https://github.com/apache/spark/pull/14284
  
    retest this please


---
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 #14284: [SPARK-16633] [SPARK-16642] Fixes three issues re...

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

    https://github.com/apache/spark/pull/14284#discussion_r71781548
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/execution/SQLWindowFunctionSuite.scala ---
    @@ -357,14 +356,59 @@ class SQLWindowFunctionSuite extends QueryTest with SQLTestUtils with TestHiveSi
       }
     
       test("SPARK-7595: Window will cause resolve failed with self join") {
    -    sql("SELECT * FROM src") // Force loading of src table.
    -
         checkAnswer(sql(
           """
             |with
    -        | v1 as (select key, count(value) over (partition by key) cnt_val from src),
    +        | v0 as (select 0 as key, 1 as value),
    +        | v1 as (select key, count(value) over (partition by key) cnt_val from v0),
             | v2 as (select v1.key, v1_lag.cnt_val from v1, v1 v1_lag where v1.key = v1_lag.key)
    -        | select * from v2 order by key limit 1
    -      """.stripMargin), Row(0, 3))
    +        | select key, cnt_val from v2 order by key limit 1
    +      """.stripMargin), Row(0, 1))
    +  }
    +
    +  test("lead/lag should return the default value if the offset row does not exist") {
    +    checkAnswer(sql(
    +      """
    +        |SELECT
    +        |  lag(123, 100, 321) OVER (ORDER BY id) as lag,
    +        |  lead(123, 100, 321) OVER (ORDER BY id) as lead
    +        |FROM (SELECT 1 as id) tmp
    +      """.stripMargin),
    +      Row(321, 321))
    +
    +    checkAnswer(sql(
    +      """
    +        |SELECT
    +        |  lag(123, 100, a) OVER (ORDER BY id) as lag,
    +        |  lead(123, 100, a) OVER (ORDER BY id) as lead
    +        |FROM (SELECT 1 as id, 2 as a) tmp
    +      """.stripMargin),
    +      Row(2, 2))
    +  }
    +
    +  test("lead/lag should be able to handle null input value correctly") {
    --- End diff --
    
    Can you explain?


---
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 #14284: [SPARK-16633] [SPARK-16642] Fixes three issues re...

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

    https://github.com/apache/spark/pull/14284#discussion_r71588935
  
    --- Diff: sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/SQLWindowFunctionSuite.scala ---
    @@ -367,4 +367,50 @@ class SQLWindowFunctionSuite extends QueryTest with SQLTestUtils with TestHiveSi
             | select * from v2 order by key limit 1
           """.stripMargin), Row(0, 3))
       }
    +
    +  test("lead/lag should return the default value if the offset row does not exist") {
    --- End diff --
    
    oh, originally we used window functions from Hive. It should be reason that we put this file at here. Let me move it.


---
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 #14284: [SPARK-16633] [SPARK-16642] [SPARK-16721] [SQL] Fixes th...

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

    https://github.com/apache/spark/pull/14284
  
    **[Test build #62854 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/62854/consoleFull)** for PR 14284 at commit [`ff3029e`](https://github.com/apache/spark/commit/ff3029e3db2214d7c51ea3ea866becf441fddac4).
     * 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 #14284: [SPARK-16633] [SPARK-16642] Fixes three issues re...

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

    https://github.com/apache/spark/pull/14284#discussion_r72083182
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/execution/SQLWindowFunctionSuite.scala ---
    @@ -357,14 +356,59 @@ class SQLWindowFunctionSuite extends QueryTest with SQLTestUtils with TestHiveSi
       }
     
       test("SPARK-7595: Window will cause resolve failed with self join") {
    -    sql("SELECT * FROM src") // Force loading of src table.
    --- End diff --
    
    it is not in Hive. So there is no table called `src`.


---
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 #14284: [SPARK-16633] [SPARK-16642] Fixes three issues related t...

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

    https://github.com/apache/spark/pull/14284
  
    test this please


---
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 #14284: [SPARK-16633] [SPARK-16642] Fixes three issues related t...

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

    https://github.com/apache/spark/pull/14284
  
    **[Test build #62611 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/62611/consoleFull)** for PR 14284 at commit [`51e6937`](https://github.com/apache/spark/commit/51e693729a11170545c42366a6d46d130128173a).


---
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 #14284: [SPARK-16633] [SPARK-16642] Fixes three issues related t...

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

    https://github.com/apache/spark/pull/14284
  
    **[Test build #62626 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/62626/consoleFull)** for PR 14284 at commit [`faa7d89`](https://github.com/apache/spark/commit/faa7d898040373ac6348376b32d5cd93015cdf32).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds the following public classes _(experimental)_:
      * `case class WindowData(month: Int, area: String, product: Int)`
      * `class SQLWindowFunctionSuite extends QueryTest with SharedSQLContext `


---
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 #14284: [SPARK-16633] [SPARK-16642] Fixes three issues related t...

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

    https://github.com/apache/spark/pull/14284
  
    Merged build finished. Test FAILed.


---
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 #14284: [SPARK-16633] [SPARK-16642] [SPARK-16721] [SQL] Fixes th...

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

    https://github.com/apache/spark/pull/14284
  
    yea. that's a good point.


---
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 #14284: [SPARK-16633] [SPARK-16642] Fixes three issues re...

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

    https://github.com/apache/spark/pull/14284#discussion_r71584966
  
    --- Diff: sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/SQLWindowFunctionSuite.scala ---
    @@ -367,4 +367,50 @@ class SQLWindowFunctionSuite extends QueryTest with SQLTestUtils with TestHiveSi
             | select * from v2 order by key limit 1
           """.stripMargin), Row(0, 3))
       }
    +
    +  test("lead/lag should return the default value if the offset row does not exist") {
    --- End diff --
    
    hm why is this file in hive?
    
    can you move it in a separate pr?



---
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 #14284: [SPARK-16633] [SPARK-16642] [SPARK-16721] [SQL] Fixes th...

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

    https://github.com/apache/spark/pull/14284
  
    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 #14284: [SPARK-16633] [SPARK-16642] [SPARK-16721] [SQL] Fixes th...

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

    https://github.com/apache/spark/pull/14284
  
    @hvanhovell  Nice, thank you very much!


---
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 #14284: [SPARK-16633] [SPARK-16642] [SPARK-16721] [SQL] Fixes th...

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

    https://github.com/apache/spark/pull/14284
  
    **[Test build #62854 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/62854/consoleFull)** for PR 14284 at commit [`ff3029e`](https://github.com/apache/spark/commit/ff3029e3db2214d7c51ea3ea866becf441fddac4).


---
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 #14284: [SPARK-16633] [SPARK-16642] [SPARK-16721] [SQL] Fixes th...

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

    https://github.com/apache/spark/pull/14284
  
    @chengat1314 this has never been supported, and is a new feature. There was some discussion on the JIRA a while back: https://issues.apache.org/jira/browse/SPARK-17423. Lets move the discussion there.


---
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 #14284: [SPARK-16633] [SPARK-16642] Fixes three issues re...

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

    https://github.com/apache/spark/pull/14284#discussion_r71990056
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/execution/SQLWindowFunctionSuite.scala ---
    @@ -357,14 +356,59 @@ class SQLWindowFunctionSuite extends QueryTest with SQLTestUtils with TestHiveSi
       }
     
       test("SPARK-7595: Window will cause resolve failed with self join") {
    -    sql("SELECT * FROM src") // Force loading of src table.
    --- End diff --
    
    but why we remove it?


---
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 #14284: [SPARK-16633] [SPARK-16642] Fixes three issues related t...

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

    https://github.com/apache/spark/pull/14284
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/62626/
    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 #14284: [SPARK-16633] [SPARK-16642] Fixes three issues related t...

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

    https://github.com/apache/spark/pull/14284
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/62611/
    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 #14284: [SPARK-16633] [SPARK-16642] Fixes three issues re...

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

    https://github.com/apache/spark/pull/14284#discussion_r71781735
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/execution/SQLWindowFunctionSuite.scala ---
    @@ -357,14 +356,59 @@ class SQLWindowFunctionSuite extends QueryTest with SQLTestUtils with TestHiveSi
       }
     
       test("SPARK-7595: Window will cause resolve failed with self join") {
    -    sql("SELECT * FROM src") // Force loading of src table.
    -
         checkAnswer(sql(
           """
             |with
    -        | v1 as (select key, count(value) over (partition by key) cnt_val from src),
    +        | v0 as (select 0 as key, 1 as value),
    +        | v1 as (select key, count(value) over (partition by key) cnt_val from v0),
             | v2 as (select v1.key, v1_lag.cnt_val from v1, v1 v1_lag where v1.key = v1_lag.key)
    -        | select * from v2 order by key limit 1
    -      """.stripMargin), Row(0, 3))
    +        | select key, cnt_val from v2 order by key limit 1
    +      """.stripMargin), Row(0, 1))
    +  }
    +
    +  test("lead/lag should return the default value if the offset row does not exist") {
    +    checkAnswer(sql(
    +      """
    +        |SELECT
    +        |  lag(123, 100, 321) OVER (ORDER BY id) as lag,
    +        |  lead(123, 100, 321) OVER (ORDER BY id) as lead
    +        |FROM (SELECT 1 as id) tmp
    +      """.stripMargin),
    +      Row(321, 321))
    +
    +    checkAnswer(sql(
    +      """
    +        |SELECT
    +        |  lag(123, 100, a) OVER (ORDER BY id) as lag,
    +        |  lead(123, 100, a) OVER (ORDER BY id) as lead
    +        |FROM (SELECT 1 as id, 2 as a) tmp
    +      """.stripMargin),
    +      Row(2, 2))
    +  }
    +
    +  test("lead/lag should be able to handle null input value correctly") {
    --- End diff --
    
    It's best if the test case name should specify the behavior, rather than saying "correctly". 
    
    Since obviously we don't want anything to be "incorrectly"



---
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 #14284: [SPARK-16633] [SPARK-16642] Fixes three issues related t...

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

    https://github.com/apache/spark/pull/14284
  
    **[Test build #62626 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/62626/consoleFull)** for PR 14284 at commit [`faa7d89`](https://github.com/apache/spark/commit/faa7d898040373ac6348376b32d5cd93015cdf32).


---
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 #14284: [SPARK-16633] [SPARK-16642] [SPARK-16721] [SQL] Fixes th...

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

    https://github.com/apache/spark/pull/14284
  
    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 #14284: [SPARK-16633] [SPARK-16642] [SPARK-16721] [SQL] Fixes th...

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

    https://github.com/apache/spark/pull/14284
  
    Thanks for review. I am merging this to master and branch 2.0.


---
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 #14284: [SPARK-16633] [SPARK-16642] Fixes three issues related t...

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

    https://github.com/apache/spark/pull/14284
  
    **[Test build #62690 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/62690/consoleFull)** for PR 14284 at commit [`073ac94`](https://github.com/apache/spark/commit/073ac94c66759d120948c04849c20634b8e4ae4e).


---
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 #14284: [SPARK-16633] [SPARK-16642] Fixes three issues related t...

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

    https://github.com/apache/spark/pull/14284
  
    **[Test build #62690 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/62690/consoleFull)** for PR 14284 at commit [`073ac94`](https://github.com/apache/spark/commit/073ac94c66759d120948c04849c20634b8e4ae4e).
     * 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 #14284: [SPARK-16633] [SPARK-16642] Fixes three issues re...

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

    https://github.com/apache/spark/pull/14284#discussion_r72144974
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/WindowExec.scala ---
    @@ -625,10 +643,12 @@ private[execution] final class OffsetWindowFunctionFrame(
         if (inputIndex >= 0 && inputIndex < input.size) {
    --- End diff --
    
    Ok, lets improve this in a follow-up PR :).


---
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 #14284: [SPARK-16633] [SPARK-16642] Fixes three issues re...

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

    https://github.com/apache/spark/pull/14284#discussion_r71489063
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/WindowExec.scala ---
    @@ -582,25 +582,43 @@ private[execution] final class OffsetWindowFunctionFrame(
       /** Row used to combine the offset and the current row. */
       private[this] val join = new JoinedRow
     
    -  /** Create the projection. */
    +  /**
    +   * Create the projection used when the offset row exists.
    +   * Please note that this project always respect null input values (like PostgreSQL).
    +   */
       private[this] val projection = {
    --- End diff --
    
    If we want to keep the behavioral change, we can make this the same as the original `project` and revert https://github.com/apache/spark/pull/14284/files#diff-4a8f00ca33a80744965463dcc6662c75R351.


---
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 #14284: [SPARK-16633] [SPARK-16642] [SPARK-16721] [SQL] F...

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

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


---
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 #14284: [SPARK-16633] [SPARK-16642] Fixes three issues related t...

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

    https://github.com/apache/spark/pull/14284
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/62690/
    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 #14284: [SPARK-16633] [SPARK-16642] [SPARK-16721] [SQL] Fixes th...

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

    https://github.com/apache/spark/pull/14284
  
    Is possible add feature to enable ignore nulls? 
    for example: 
    LAG (value_expr [, offset ])
    [ IGNORE NULLS | RESPECT NULLS ]
    OVER ( [ PARTITION BY window_partition ] ORDER BY window_ordering )
    
    thanks
    Cheng Feng


---
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 #14284: [SPARK-16633] [SPARK-16642] Fixes three issues re...

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

    https://github.com/apache/spark/pull/14284#discussion_r71993975
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/WindowExec.scala ---
    @@ -625,10 +643,12 @@ private[execution] final class OffsetWindowFunctionFrame(
         if (inputIndex >= 0 && inputIndex < input.size) {
    --- End diff --
    
    This is a more general comment, which does not necessarily apply to this line. Since we are breaking the code up into to separate code paths (with row/without row), we might as well get rid of the joined row and the logic needed to set this up (like: `Seq.fill(ordinal)(NoOp)`)


---
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 #14284: [SPARK-16633] [SPARK-16642] Fixes three issues related t...

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

    https://github.com/apache/spark/pull/14284
  
    **[Test build #62609 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/62609/consoleFull)** for PR 14284 at commit [`c2fd2d7`](https://github.com/apache/spark/commit/c2fd2d786f952877cf51f685056b1068c455f776).


---
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 #14284: [SPARK-16633] [SPARK-16642] Fixes three issues related t...

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

    https://github.com/apache/spark/pull/14284
  
    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 #14284: [SPARK-16633] [SPARK-16642] Fixes three issues related t...

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

    https://github.com/apache/spark/pull/14284
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/62609/
    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 #14284: [SPARK-16633] [SPARK-16642] [SPARK-16721] [SQL] Fixes th...

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

    https://github.com/apache/spark/pull/14284
  
    Are we able to enable ignore null feature in Spark 2.1? 
    like lag(comm ignore nulls) over (order by empno) prev_comm. 
    thx


---
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 #14284: [SPARK-16633] [SPARK-16642] Fixes three issues re...

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

    https://github.com/apache/spark/pull/14284#discussion_r72083334
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/WindowExec.scala ---
    @@ -625,10 +643,12 @@ private[execution] final class OffsetWindowFunctionFrame(
         if (inputIndex >= 0 && inputIndex < input.size) {
    --- End diff --
    
    Yea, we can improve this part in 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 #14284: [SPARK-16633] [SPARK-16642] Fixes three issues related t...

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

    https://github.com/apache/spark/pull/14284
  
    Without a good reason and providing a way �to make lead and lag respect Bulls, we should not change the behavior.
    
    
    
    
    
    
    On Wed, Jul 20, 2016 at 2:04 AM -0700, "Apache Spark QA" <no...@github.com> wrote:
    
    
    
    
    
    
    
    
    
    
    
    
    Test build #62593 has started for PR 14284 at commit c2fd2d7.
    
    
    
    \u2014
    You are receiving this because you authored the thread.
    Reply to this email directly, view it on GitHub, or mute the thread.
    
    
      
      
    
    
    
    
    
    
    
    



---
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 #14284: [SPARK-16633] [SPARK-16642] Fixes three issues related t...

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

    https://github.com/apache/spark/pull/14284
  
    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 #14284: [SPARK-16633] [SPARK-16642] Fixes three issues related t...

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

    https://github.com/apache/spark/pull/14284
  
    **[Test build #62609 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/62609/consoleFull)** for PR 14284 at commit [`c2fd2d7`](https://github.com/apache/spark/commit/c2fd2d786f952877cf51f685056b1068c455f776).
     * 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 #14284: [SPARK-16633] [SPARK-16642] Fixes three issues related t...

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

    https://github.com/apache/spark/pull/14284
  
    **[Test build #62611 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/62611/consoleFull)** for PR 14284 at commit [`51e6937`](https://github.com/apache/spark/commit/51e693729a11170545c42366a6d46d130128173a).
     * 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 #14284: [SPARK-16633] [SPARK-16642] [SPARK-16721] [SQL] Fixes th...

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

    https://github.com/apache/spark/pull/14284
  
    should we also update the doc for `OffsetWindowFunction.default`?


---
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 #14284: [SPARK-16633] [SPARK-16642] Fixes three issues re...

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

    https://github.com/apache/spark/pull/14284#discussion_r71488537
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/windowExpressions.scala ---
    @@ -382,7 +382,7 @@ abstract class OffsetWindowFunction
      *
      * @param input expression to evaluate 'offset' rows after the current row.
      * @param offset rows to jump ahead in the partition.
    - * @param default to use when the input value is null or when the offset is larger than the window.
    + * @param default to use when the offset is larger than the window.
    --- End diff --
    
    @hvanhovell what was the reason that we changed the behavior of lead and lag on if they respect null values?


---
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 #14284: [SPARK-16633] [SPARK-16642] Fixes three issues related t...

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

    https://github.com/apache/spark/pull/14284
  
    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 #14284: [SPARK-16633] [SPARK-16642] [SPARK-16721] [SQL] Fixes th...

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

    https://github.com/apache/spark/pull/14284
  
    this this please


---
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 #14284: [SPARK-16633] [SPARK-16642] Fixes three issues related t...

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

    https://github.com/apache/spark/pull/14284
  
    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 #14284: [SPARK-16633] [SPARK-16642] Fixes three issues related t...

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

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


---
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 #14284: [SPARK-16633] [SPARK-16642] Fixes three issues re...

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

    https://github.com/apache/spark/pull/14284#discussion_r71598723
  
    --- Diff: sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/SQLWindowFunctionSuite.scala ---
    @@ -367,4 +367,50 @@ class SQLWindowFunctionSuite extends QueryTest with SQLTestUtils with TestHiveSi
             | select * from v2 order by key limit 1
           """.stripMargin), Row(0, 3))
       }
    +
    +  test("lead/lag should return the default value if the offset row does not exist") {
    --- End diff --
    
    Done


---
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