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/06/29 18:39:03 UTC

[GitHub] spark pull request #13977: [SPARK-16301] [SQL] The analyzer rule for resolvi...

GitHub user yhuai opened a pull request:

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

    [SPARK-16301] [SQL] The analyzer rule for resolving using joins should respect the case sensitivity setting.

    ## What changes were proposed in this pull request?
    The analyzer rule for resolving using joins should respect the case sensitivity setting.
    
    
    ## How was this patch tested?
    New tests in ResolveNaturalJoinSuite

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

    $ git pull https://github.com/yhuai/spark SPARK-16301

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

    https://github.com/apache/spark/pull/13977.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 #13977
    
----
commit 52ba66663819bdaf6526061c91791486ba4b90ea
Author: Yin Huai <yh...@databricks.com>
Date:   2016-06-29T18:37:42Z

    [SPARK-16301] [SQL] The analyzer rulr for resolving using joins should respect the case sensitivity setting.

----


---
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 #13977: [SPARK-16301] [SQL] The analyzer rule for resolving usin...

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

    https://github.com/apache/spark/pull/13977
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/61485/
    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 #13977: [SPARK-16301] [SQL] The analyzer rule for resolving usin...

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

    https://github.com/apache/spark/pull/13977
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/61483/
    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 #13977: [SPARK-16301] [SQL] The analyzer rule for resolvi...

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

    https://github.com/apache/spark/pull/13977#discussion_r69007868
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala ---
    @@ -1836,13 +1836,15 @@ class Analyzer(
       }
     
       private def commonNaturalJoinProcessing(
    -     left: LogicalPlan,
    -     right: LogicalPlan,
    -     joinType: JoinType,
    -     joinNames: Seq[String],
    -     condition: Option[Expression]) = {
    -    val leftKeys = joinNames.map(keyName => left.output.find(_.name == keyName).get)
    -    val rightKeys = joinNames.map(keyName => right.output.find(_.name == keyName).get)
    +      left: LogicalPlan,
    +      right: LogicalPlan,
    +      joinType: JoinType,
    +      joinNames: Seq[String],
    +      condition: Option[Expression]) = {
    +    val leftKeys =
    --- End diff --
    
    Is it possible to throw a better exception here as well in case `.get` fails?


---
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 #13977: [SPARK-16301] [SQL] The analyzer rule for resolving usin...

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

    https://github.com/apache/spark/pull/13977
  
    **[Test build #61483 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/61483/consoleFull)** for PR 13977 at commit [`52ba666`](https://github.com/apache/spark/commit/52ba66663819bdaf6526061c91791486ba4b90ea).


---
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 #13977: [SPARK-16301] [SQL] The analyzer rule for resolving usin...

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

    https://github.com/apache/spark/pull/13977
  
    **[Test build #61491 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/61491/consoleFull)** for PR 13977 at commit [`b5b5954`](https://github.com/apache/spark/commit/b5b5954413b8b4beb317facdf0db937455353d78).
     * 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 #13977: [SPARK-16301] [SQL] The analyzer rule for resolving usin...

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

    https://github.com/apache/spark/pull/13977
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/61491/
    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 #13977: [SPARK-16301] [SQL] The analyzer rule for resolving usin...

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

    https://github.com/apache/spark/pull/13977
  
    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 #13977: [SPARK-16301] [SQL] The analyzer rule for resolving usin...

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

    https://github.com/apache/spark/pull/13977
  
    **[Test build #61485 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/61485/consoleFull)** for PR 13977 at commit [`e051a88`](https://github.com/apache/spark/commit/e051a8889da10369f29613a09fd69354f022e339).
     * 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 #13977: [SPARK-16301] [SQL] The analyzer rule for resolving usin...

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

    https://github.com/apache/spark/pull/13977
  
    LGTM, 
    Merging this into master and 2.0, 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 issue #13977: [SPARK-16301] [SQL] The analyzer rule for resolving usin...

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

    https://github.com/apache/spark/pull/13977
  
    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 #13977: [SPARK-16301] [SQL] The analyzer rule for resolving usin...

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

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


---
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 #13977: [SPARK-16301] [SQL] The analyzer rule for resolving usin...

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

    https://github.com/apache/spark/pull/13977
  
    **[Test build #61483 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/61483/consoleFull)** for PR 13977 at commit [`52ba666`](https://github.com/apache/spark/commit/52ba66663819bdaf6526061c91791486ba4b90ea).
     * 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 #13977: [SPARK-16301] [SQL] The analyzer rule for resolving usin...

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

    https://github.com/apache/spark/pull/13977
  
    Just a single comment, otherwise LGTM. Thanks for addressing this so quickly!


---
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 #13977: [SPARK-16301] [SQL] The analyzer rule for resolving usin...

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

    https://github.com/apache/spark/pull/13977
  
    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 #13977: [SPARK-16301] [SQL] The analyzer rule for resolvi...

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

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


---
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 #13977: [SPARK-16301] [SQL] The analyzer rule for resolvi...

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

    https://github.com/apache/spark/pull/13977#discussion_r69004659
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala ---
    @@ -1836,13 +1836,15 @@ class Analyzer(
       }
     
       private def commonNaturalJoinProcessing(
    -     left: LogicalPlan,
    -     right: LogicalPlan,
    -     joinType: JoinType,
    -     joinNames: Seq[String],
    -     condition: Option[Expression]) = {
    -    val leftKeys = joinNames.map(keyName => left.output.find(_.name == keyName).get)
    -    val rightKeys = joinNames.map(keyName => right.output.find(_.name == keyName).get)
    +      left: LogicalPlan,
    +      right: LogicalPlan,
    +      joinType: JoinType,
    +      joinNames: Seq[String],
    +      condition: Option[Expression]) = {
    --- End diff --
    
    These 5 lines are just formatting changes.


---
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 #13977: [SPARK-16301] [SQL] The analyzer rule for resolving usin...

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

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


---
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 #13977: [SPARK-16301] [SQL] The analyzer rule for resolvi...

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

    https://github.com/apache/spark/pull/13977#discussion_r69010595
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala ---
    @@ -1836,13 +1836,15 @@ class Analyzer(
       }
     
       private def commonNaturalJoinProcessing(
    -     left: LogicalPlan,
    -     right: LogicalPlan,
    -     joinType: JoinType,
    -     joinNames: Seq[String],
    -     condition: Option[Expression]) = {
    -    val leftKeys = joinNames.map(keyName => left.output.find(_.name == keyName).get)
    -    val rightKeys = joinNames.map(keyName => right.output.find(_.name == keyName).get)
    +      left: LogicalPlan,
    +      right: LogicalPlan,
    +      joinType: JoinType,
    +      joinNames: Seq[String],
    +      condition: Option[Expression]) = {
    +    val leftKeys =
    --- End diff --
    
    https://github.com/apache/spark/blob/master/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala#L1825 will make sure that it will not be None after this issue is fixed. I can add an assert. 


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