You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by nongli <gi...@git.apache.org> on 2015/12/11 02:42:36 UTC

[GitHub] spark pull request: [SPARK-12271][SQL] Improve error message when ...

GitHub user nongli opened a pull request:

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

    [SPARK-12271][SQL] Improve error message when Dataset.as has incompatible schemas.

    

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

    $ git pull https://github.com/nongli/spark spark-11271

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

    https://github.com/apache/spark/pull/10260.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 #10260
    
----
commit ceed59b84567712514dc0cbab271abdb9afd65a6
Author: Nong Li <no...@databricks.com>
Date:   2015-12-11T01:40:45Z

    [SPARK-12271][SQL] Improve error message when Dataset.as has incompatible schemas.

----


---
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-12271][SQL] Improve error message when ...

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

    https://github.com/apache/spark/pull/10260#issuecomment-163822865
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/47560/
    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: [SPARK-12271][SQL] Improve error message when ...

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

    https://github.com/apache/spark/pull/10260#issuecomment-164877081
  
    **[Test build #47747 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/47747/consoleFull)** for PR 10260 at commit [`359b3e2`](https://github.com/apache/spark/commit/359b3e217102f6be96afbc6f0199e7a179ed2ce0).


---
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-12271][SQL] Improve error message when ...

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

    https://github.com/apache/spark/pull/10260#issuecomment-164877638
  
    This looks great now!
    
    LGTM pending tests / conflict resolution


---
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-12271][SQL] Improve error message when ...

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

    https://github.com/apache/spark/pull/10260#issuecomment-164936147
  
    **[Test build #47754 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/47754/consoleFull)** for PR 10260 at commit [`b5007d7`](https://github.com/apache/spark/commit/b5007d7c01287ef578d1153dd2123fbb869cfe1d).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds the following public classes _(experimental)_:\n  * `case class WrapOption(child: Expression, optType: DataType)`\n


---
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-12271][SQL] Improve error message when ...

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

    https://github.com/apache/spark/pull/10260#issuecomment-163808481
  
    **[Test build #47560 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/47560/consoleFull)** for PR 10260 at commit [`ceed59b`](https://github.com/apache/spark/commit/ceed59b84567712514dc0cbab271abdb9afd65a6).


---
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-12271][SQL] Improve error message when ...

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

    https://github.com/apache/spark/pull/10260#discussion_r47687871
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/encoders/ExpressionEncoder.scala ---
    @@ -251,6 +251,25 @@ case class ExpressionEncoder[T](
     
         val plan = Project(Alias(unbound, "")() :: Nil, LocalRelation(schema))
         val analyzedPlan = SimpleAnalyzer.execute(plan)
    +    if (!analyzedPlan.resolved) {
    +      analyzedPlan match {
    +        // Looked for UpCasts. If these still exist, it indicates they could not resolve and
    +        // something about the schemas is mismatched.
    +        case p @ Project(projectList, _) => {
    --- End diff --
    
    much better!


---
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-12271][SQL] Improve error message when ...

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

    https://github.com/apache/spark/pull/10260#issuecomment-164911838
  
    **[Test build #47754 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/47754/consoleFull)** for PR 10260 at commit [`b5007d7`](https://github.com/apache/spark/commit/b5007d7c01287ef578d1153dd2123fbb869cfe1d).


---
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-12271][SQL] Improve error message when ...

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

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


---
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-12271][SQL] Improve error message when ...

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

    https://github.com/apache/spark/pull/10260#discussion_r47584790
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/encoders/ExpressionEncoder.scala ---
    @@ -251,6 +251,25 @@ case class ExpressionEncoder[T](
     
         val plan = Project(Alias(unbound, "")() :: Nil, LocalRelation(schema))
         val analyzedPlan = SimpleAnalyzer.execute(plan)
    +    if (!analyzedPlan.resolved) {
    +      analyzedPlan match {
    +        // Looked for UpCasts. If these still exist, it indicates they could not resolve and
    +        // something about the schemas is mismatched.
    +        case p @ Project(projectList, _) => {
    +          p.projectList.foreach { e: NamedExpression => e.foreach { _ match {
    --- End diff --
    
    I think the extra `_ match {` is not needed.


---
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-12271][SQL] Improve error message when ...

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

    https://github.com/apache/spark/pull/10260#issuecomment-164909259
  
    **[Test build #47747 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/47747/consoleFull)** for PR 10260 at commit [`359b3e2`](https://github.com/apache/spark/commit/359b3e217102f6be96afbc6f0199e7a179ed2ce0).
     * This patch passes all tests.
     * This patch **does not merge cleanly**.
     * This patch adds the following public classes _(experimental)_:\n  * `case class WrapOption(child: Expression, optType: DataType)`\n


---
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-12271][SQL] Improve error message when ...

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/10260#discussion_r47321487
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/encoders/ExpressionEncoder.scala ---
    @@ -251,6 +251,27 @@ case class ExpressionEncoder[T](
     
         val plan = Project(Alias(unbound, "")() :: Nil, LocalRelation(schema))
         val analyzedPlan = SimpleAnalyzer.execute(plan)
    +    if (!analyzedPlan.resolved) {
    +      // We couldn't resolve, this means something is wrong with the schemas.
    +      analyzedPlan match {
    +        case p @ Project(projectList, _) => {
    +          p.projectList.foreach { e: NamedExpression => e.foreach { _ match {
    +            case u @ UpCast(child, dataType, walkedTypePath) => {
    +              throw new AnalysisException(s"Cannot resolve `${child.prettyString}`. " +
    +                "The type path of the target object is:\n" +
    +                walkedTypePath.mkString("", "\n", "\n") +
    +                "Ensure that the input schema contains this field.\n - Input schema is " +
    +                schema.map(_.simpleString).mkString(", "))
    --- End diff --
    
    should we also provide the type information of attributes in `schema`?


---
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-12271][SQL] Improve error message when ...

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

    https://github.com/apache/spark/pull/10260#issuecomment-164909425
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/47747/
    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-12271][SQL] Improve error message when ...

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

    https://github.com/apache/spark/pull/10260#issuecomment-164944125
  
    LGTM


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-12271][SQL] Improve error message when ...

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

    https://github.com/apache/spark/pull/10260#discussion_r47560896
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/encoders/ExpressionEncoder.scala ---
    @@ -251,6 +251,27 @@ case class ExpressionEncoder[T](
     
         val plan = Project(Alias(unbound, "")() :: Nil, LocalRelation(schema))
         val analyzedPlan = SimpleAnalyzer.execute(plan)
    +    if (!analyzedPlan.resolved) {
    +      // We couldn't resolve, this means something is wrong with the schemas.
    +      analyzedPlan match {
    +        case p @ Project(projectList, _) => {
    +          p.projectList.foreach { e: NamedExpression => e.foreach { _ match {
    +            case u @ UpCast(child, dataType, walkedTypePath) => {
    +              throw new AnalysisException(s"Cannot resolve `${child.prettyString}`. " +
    +                "The type path of the target object is:\n" +
    +                walkedTypePath.mkString("", "\n", "\n") +
    +                "Ensure that the input schema contains this field.\n - Input schema is " +
    +                schema.map(_.simpleString).mkString(", "))
    --- 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


[GitHub] spark pull request: [SPARK-12271][SQL] Improve error message when ...

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

    https://github.com/apache/spark/pull/10260#issuecomment-164536300
  
    Could you maybe update the PR description to include the description from the JIRA?


---
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-12271][SQL] Improve error message when ...

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

    https://github.com/apache/spark/pull/10260#discussion_r47584808
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/DatasetSuite.scala ---
    @@ -481,10 +481,17 @@ class DatasetSuite extends QueryTest with SharedSQLContext {
         val ds = Seq(2 -> 2.toByte, 3 -> 3.toByte).toDF("a", "b").as[ClassData]
         assert(ds.collect().toSeq == Seq(ClassData("2", 2), ClassData("3", 3)))
       }
    -}
     
    +  test("verify mismatching field names fail with a good error") {
    +    val ds = Seq(ClassData("a", 1)).toDS()
    +    intercept[AnalysisException] {
    --- End diff --
    
    Check that the message has some key things in it? (variable names, types, etc.)


---
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-12271][SQL] Improve error message when ...

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

    https://github.com/apache/spark/pull/10260#discussion_r47584025
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/encoders/ExpressionEncoder.scala ---
    @@ -251,6 +251,25 @@ case class ExpressionEncoder[T](
     
         val plan = Project(Alias(unbound, "")() :: Nil, LocalRelation(schema))
         val analyzedPlan = SimpleAnalyzer.execute(plan)
    +    if (!analyzedPlan.resolved) {
    +      analyzedPlan match {
    +        // Looked for UpCasts. If these still exist, it indicates they could not resolve and
    +        // something about the schemas is mismatched.
    +        case p @ Project(projectList, _) => {
    --- End diff --
    
    Is there a reason to not just put this in `CheckAnalysis` and make it more general (i.e. not just `Project`)?  I realize its only used here now, but if we ever do use it elsewhere, its invalid to remain after analysis.


---
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-12271][SQL] Improve error message when ...

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

    https://github.com/apache/spark/pull/10260#issuecomment-164591255
  
    **[Test build #47680 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/47680/consoleFull)** for PR 10260 at commit [`f177d55`](https://github.com/apache/spark/commit/f177d55999f65912f362801ff080b059f8a30625).
     * 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-12271][SQL] Improve error message when ...

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

    https://github.com/apache/spark/pull/10260#issuecomment-164591396
  
    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-12271][SQL] Improve error message when ...

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

    https://github.com/apache/spark/pull/10260#issuecomment-164936291
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/47754/
    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-12271][SQL] Improve error message when ...

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

    https://github.com/apache/spark/pull/10260#issuecomment-164570110
  
    **[Test build #47680 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/47680/consoleFull)** for PR 10260 at commit [`f177d55`](https://github.com/apache/spark/commit/f177d55999f65912f362801ff080b059f8a30625).


---
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-12271][SQL] Improve error message when ...

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

    https://github.com/apache/spark/pull/10260#issuecomment-164909422
  
    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-12271][SQL] Improve error message when ...

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

    https://github.com/apache/spark/pull/10260#issuecomment-163822860
  
    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 pull request: [SPARK-12271][SQL] Improve error message when ...

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

    https://github.com/apache/spark/pull/10260#issuecomment-164948805
  
    Thanks, merging to master.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-12271][SQL] Improve error message when ...

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

    https://github.com/apache/spark/pull/10260#issuecomment-163822737
  
    **[Test build #47560 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/47560/consoleFull)** for PR 10260 at commit [`ceed59b`](https://github.com/apache/spark/commit/ceed59b84567712514dc0cbab271abdb9afd65a6).
     * 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 pull request: [SPARK-12271][SQL] Improve error message when ...

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

    https://github.com/apache/spark/pull/10260#issuecomment-164936287
  
    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-12271][SQL] Improve error message when ...

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/10260#discussion_r47321718
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/encoders/ExpressionEncoder.scala ---
    @@ -251,6 +251,27 @@ case class ExpressionEncoder[T](
     
         val plan = Project(Alias(unbound, "")() :: Nil, LocalRelation(schema))
         val analyzedPlan = SimpleAnalyzer.execute(plan)
    +    if (!analyzedPlan.resolved) {
    +      // We couldn't resolve, this means something is wrong with the schemas.
    +      analyzedPlan match {
    +        case p @ Project(projectList, _) => {
    +          p.projectList.foreach { e: NamedExpression => e.foreach { _ match {
    +            case u @ UpCast(child, dataType, walkedTypePath) => {
    +              throw new AnalysisException(s"Cannot resolve `${child.prettyString}`. " +
    +                "The type path of the target object is:\n" +
    +                walkedTypePath.mkString("", "\n", "\n") +
    +                "Ensure that the input schema contains this field.\n - Input schema is " +
    +                schema.map(_.simpleString).mkString(", "))
    --- End diff --
    
    the `simpleString` of attribute includes expr id, which I think is noisy to users, should we generate the string manually or use `StructType.fromAttributes` to turn `schema` into `StructType` and call `StrcutType.simpleString`?


---
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-12271][SQL] Improve error message when ...

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

    https://github.com/apache/spark/pull/10260#issuecomment-164591398
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/47680/
    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