You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by rajeshbalamohan <gi...@git.apache.org> on 2016/04/25 15:14:54 UTC

[GitHub] spark pull request: [SPARK-14752][SQL] LazilyGenerateOrdering thro...

GitHub user rajeshbalamohan opened a pull request:

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

    [SPARK-14752][SQL] LazilyGenerateOrdering throws NullPointerException

    ## What changes were proposed in this pull request?
    LazilyGenerateOrdering throws NullPointerException when clubbed with TakeOrderedAndProjectExec. This causes simple queries like "select i_item_id from item order by i_item_id limit 10;" would fail in spark-sql. When deserializing in DirectTaskResult, it goes through nested structure in Kryo causing NPE for generatedOrdering.
    
    
    ## How was this patch tested?
    Manual testing by running multiple SQL queries in multi node cluster.


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

    $ git pull https://github.com/rajeshbalamohan/spark SPARK-14752

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

    https://github.com/apache/spark/pull/12661.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 #12661
    
----
commit e83c9bc87acc794ca3e9a37c999c05550d425e2b
Author: Rajesh Balamohan <rb...@apache.org>
Date:   2016-04-25T13:09:58Z

    [SPARK-14752][SQL] LazilyGenerateOrdering throws NullPointerException with TakeOrderedAndProject

----


---
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-14752][SQL] LazilyGenerateOrdering thro...

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

    https://github.com/apache/spark/pull/12661#issuecomment-214365786
  
    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-14752][SQL] LazilyGenerateOrdering thro...

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

    https://github.com/apache/spark/pull/12661#discussion_r62265714
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/GenerateOrdering.scala ---
    @@ -154,12 +154,14 @@ class LazilyGeneratedOrdering(val ordering: Seq[SortOrder]) extends Ordering[Int
       private[this] var generatedOrdering = GenerateOrdering.generate(ordering)
     
       def compare(a: InternalRow, b: InternalRow): Int = {
    +    if (generatedOrdering == null) {
    --- End diff --
    
    Should making the generatedOrdering as `lazy val` be enough? 
    
    see http://fdahms.com/2015/10/14/scala-and-the-transient-lazy-val-pattern/


---
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-14752][SQL] LazilyGenerateOrdering thro...

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

    https://github.com/apache/spark/pull/12661#issuecomment-217296484
  
    Could you add an regression 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 issue #12661: [SPARK-14752][SQL] LazilyGenerateOrdering throws NullPoi...

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

    https://github.com/apache/spark/pull/12661
  
    @rajeshbalamohan, it appears that this issue has been fixed by #13466, so do you mind closing your pull request? Thanks!


---
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 #12661: [SPARK-14752][SQL] LazilyGenerateOrdering throws ...

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

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


---
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-14752][SQL] LazilyGenerateOrdering thro...

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

    https://github.com/apache/spark/pull/12661#issuecomment-214365469
  
    **[Test build #56897 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/56897/consoleFull)** for PR 12661 at commit [`e83c9bc`](https://github.com/apache/spark/commit/e83c9bc87acc794ca3e9a37c999c05550d425e2b).
     * 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-14752][SQL] LazilyGenerateOrdering thro...

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

    https://github.com/apache/spark/pull/12661#issuecomment-214317552
  
    **[Test build #56897 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/56897/consoleFull)** for PR 12661 at commit [`e83c9bc`](https://github.com/apache/spark/commit/e83c9bc87acc794ca3e9a37c999c05550d425e2b).


---
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-14752][SQL] LazilyGenerateOrdering thro...

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

    https://github.com/apache/spark/pull/12661#issuecomment-214365789
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/56897/
    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-14752][SQL] LazilyGenerateOrdering thro...

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

    https://github.com/apache/spark/pull/12661#issuecomment-219582450
  
    Since this one has been here for more than 10 days, I've provided another approach with new test case. Please take a look. Thanks.
    [PR for SPARK-14752](https://github.com/apache/spark/pull/13141)


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