You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by icexelloss <gi...@git.apache.org> on 2018/08/23 18:44:02 UTC

[GitHub] spark pull request #22208: Improve error message when a column containing do...

GitHub user icexelloss opened a pull request:

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

    Improve error message when a column containing dot cannot be resolved

    ## What changes were proposed in this pull request?
    
    The current error message is  often confusing to a new Spark user that a column containing "." needs backticks quote. 
    
    For example, consider the following code:
    ```
    spark.range(0, 1).toDF('a.b')['a.b']
    ```
    
    the current message looks like:
    
    ```
    Cannot resolve column name "a.b" among (a.b)
    ```
    This PR improves the error message to, 
    
    ```
    Cannot resolve column name "a.b" among (a.b). Try adding backticks to the column name, i.e., `a.b`;
    ``` 
    
    ## How was this patch tested?
    
    Manual test in shell


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

    $ git pull https://github.com/icexelloss/spark SPARK-25216-backticks-error-message

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

    https://github.com/apache/spark/pull/22208.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 #22208
    
----
commit 21a3732104f311785946a0808dbc132f0e7a892e
Author: Li Jin <ic...@...>
Date:   2018-08-23T18:42:37Z

    Improve error message when a column containing dot cannot be resolved

----


---

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


[GitHub] spark issue #22208: [SPARK-25216][SQL] Improve error message when a column c...

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

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


---

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


[GitHub] spark issue #22208: [SPARK-25216][SQL] Improve error message when a column c...

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

    https://github.com/apache/spark/pull/22208
  
    Build finished. Test FAILed.


---

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


[GitHub] spark issue #22208: [SPARK-25216][SQL] Improve error message when a column c...

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

    https://github.com/apache/spark/pull/22208
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/2684/
    Test PASSed.


---

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


[GitHub] spark issue #22208: [SPARK-25216][SQL] Improve error message when a column c...

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

    https://github.com/apache/spark/pull/22208
  
    Build finished. Test PASSed.


---

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


[GitHub] spark issue #22208: [SPARK-25216][SQL] Improve error message when a column c...

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

    https://github.com/apache/spark/pull/22208
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/4207/
    Test PASSed.


---

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


[GitHub] spark issue #22208: [SPARK-25216][SQL] Improve error message when a column c...

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

    https://github.com/apache/spark/pull/22208
  
    Thank you for updating and adding a test case, @icexelloss .
    
    - First of all, my previous comment about using `resolver` means the following. Instead of `queryExecution.analyzed.resolveQuoted(xxx, resolver).isDefined`, the following will be enough and fast.
        ```scala
        - if (schema.fieldNames.contains(colName)) {
        + if (schema.fieldNames.exists(resolver(_, colName))) {
        ```
    
    - Given that this is about appending additional note at the end of error message, the third commit looks too aggressive change. Could you rollback that in order to minimize the touched line?


---

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


[GitHub] spark issue #22208: [SPARK-25216][SQL] Improve error message when a column c...

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

    https://github.com/apache/spark/pull/22208
  
    **[Test build #95439 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/95439/testReport)** for PR 22208 at commit [`2b00e92`](https://github.com/apache/spark/commit/2b00e92a575f99247a752d1f84883ec4f3fefdaf).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

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


[GitHub] spark issue #22208: [SPARK-25216][SQL] Improve error message when a column c...

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

    https://github.com/apache/spark/pull/22208
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/4202/
    Test PASSed.


---

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


[GitHub] spark issue #22208: [SPARK-25216][SQL] Improve error message when a column c...

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

    https://github.com/apache/spark/pull/22208
  
    **[Test build #95315 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/95315/testReport)** for PR 22208 at commit [`a8a5976`](https://github.com/apache/spark/commit/a8a59760228d4fac54175caeffdfe07faf26a184).


---

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


[GitHub] spark issue #22208: [SPARK-25216][SQL] Improve error message when a column c...

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

    https://github.com/apache/spark/pull/22208
  
    **[Test build #95315 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/95315/testReport)** for PR 22208 at commit [`a8a5976`](https://github.com/apache/spark/commit/a8a59760228d4fac54175caeffdfe07faf26a184).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

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


[GitHub] spark issue #22208: [SPARK-25216][SQL] Improve error message when a column c...

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

    https://github.com/apache/spark/pull/22208
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/4245/
    Test PASSed.


---

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


[GitHub] spark issue #22208: [SPARK-25216][SQL] Improve error message when a column c...

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

    https://github.com/apache/spark/pull/22208
  
    Retest this please.


---

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


[GitHub] spark pull request #22208: [SPARK-25216][SQL] Improve error message when a c...

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

    https://github.com/apache/spark/pull/22208#discussion_r212500744
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala ---
    @@ -216,8 +216,16 @@ class Dataset[T] private[sql](
       private[sql] def resolve(colName: String): NamedExpression = {
         queryExecution.analyzed.resolveQuoted(colName, sparkSession.sessionState.analyzer.resolver)
           .getOrElse {
    -        throw new AnalysisException(
    -          s"""Cannot resolve column name "$colName" among (${schema.fieldNames.mkString(", ")})""")
    +        if (schema.fieldNames.contains(colName)) {
    +          throw new AnalysisException(
    +            s"""Cannot resolve column name "$colName" among (${schema.fieldNames.mkString(", ")}).
    +               | Try adding backticks to the column name, i.e., `$colName`"""
    --- End diff --
    
    I would explain, for instance, if the name parts in the column should be kept as the part of its column name, try to quote them by backticks.


---

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


[GitHub] spark issue #22208: [SPARK-25216][SQL] Improve error message when a column c...

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

    https://github.com/apache/spark/pull/22208
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/2505/
    Test PASSed.


---

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


[GitHub] spark pull request #22208: [SPARK-25216][SQL] Improve error message when a c...

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

    https://github.com/apache/spark/pull/22208#discussion_r212629188
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala ---
    @@ -216,8 +216,16 @@ class Dataset[T] private[sql](
       private[sql] def resolve(colName: String): NamedExpression = {
         queryExecution.analyzed.resolveQuoted(colName, sparkSession.sessionState.analyzer.resolver)
           .getOrElse {
    -        throw new AnalysisException(
    -          s"""Cannot resolve column name "$colName" among (${schema.fieldNames.mkString(", ")})""")
    +        if (schema.fieldNames.contains(colName)) {
    +          throw new AnalysisException(
    +            s"""Cannot resolve column name "$colName" among (${schema.fieldNames.mkString(", ")}).
    +               | Try adding backticks to the column name, i.e., `$colName`"""
    --- End diff --
    
    @HyukjinKwon Thanks for the review!
    
    Sorry I don't quite understand your sentence here:
    >  if the name parts in the column should be kept as the part of its column name
    
    Would you mind elaborating what do you mean?


---

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


[GitHub] spark issue #22208: [SPARK-25216][SQL] Improve error message when a column c...

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

    https://github.com/apache/spark/pull/22208
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/2592/
    Test PASSed.


---

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


[GitHub] spark issue #22208: [SPARK-25216][SQL] Improve error message when a column c...

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

    https://github.com/apache/spark/pull/22208
  
    **[Test build #95301 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/95301/testReport)** for PR 22208 at commit [`01f9cd5`](https://github.com/apache/spark/commit/01f9cd5c0450ce35f7e91ebe7328cdee3e911441).


---

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


[GitHub] spark pull request #22208: [SPARK-25216][SQL] Improve error message when a c...

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

    https://github.com/apache/spark/pull/22208#discussion_r212788594
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala ---
    @@ -216,8 +216,16 @@ class Dataset[T] private[sql](
       private[sql] def resolve(colName: String): NamedExpression = {
         queryExecution.analyzed.resolveQuoted(colName, sparkSession.sessionState.analyzer.resolver)
           .getOrElse {
    -        throw new AnalysisException(
    -          s"""Cannot resolve column name "$colName" among (${schema.fieldNames.mkString(", ")})""")
    +        if (schema.fieldNames.contains(colName)) {
    +          throw new AnalysisException(
    +            s"""Cannot resolve column name "$colName" among (${schema.fieldNames.mkString(", ")}).
    +               | Try adding backticks to the column name, i.e., `$colName`"""
    --- End diff --
    
    Yup, please go ahead.


---

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


[GitHub] spark issue #22208: [SPARK-25216][SQL] Improve error message when a column c...

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

    https://github.com/apache/spark/pull/22208
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #22208: [SPARK-25216][SQL] Improve error message when a column c...

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

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


---

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


[GitHub] spark issue #22208: [SPARK-25216][SQL] Improve error message when a column c...

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

    https://github.com/apache/spark/pull/22208
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #22208: [SPARK-25216][SQL] Improve error message when a column c...

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

    https://github.com/apache/spark/pull/22208
  
    **[Test build #95427 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/95427/testReport)** for PR 22208 at commit [`a8a5976`](https://github.com/apache/spark/commit/a8a59760228d4fac54175caeffdfe07faf26a184).
     * This patch **fails Spark unit tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

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


[GitHub] spark pull request #22208: [SPARK-25216][SQL] Improve error message when a c...

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

    https://github.com/apache/spark/pull/22208#discussion_r212716787
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala ---
    @@ -216,8 +216,16 @@ class Dataset[T] private[sql](
       private[sql] def resolve(colName: String): NamedExpression = {
         queryExecution.analyzed.resolveQuoted(colName, sparkSession.sessionState.analyzer.resolver)
           .getOrElse {
    -        throw new AnalysisException(
    -          s"""Cannot resolve column name "$colName" among (${schema.fieldNames.mkString(", ")})""")
    +        if (schema.fieldNames.contains(colName)) {
    +          throw new AnalysisException(
    +            s"""Cannot resolve column name "$colName" among (${schema.fieldNames.mkString(", ")}).
    +               | Try adding backticks to the column name, i.e., `$colName`"""
    --- End diff --
    
    I see, how about:
    ```
    Try adding backticks to the column name, i.e., `$colName`, if $colName is the name of the whole column
    ```
    I am fine with either one



---

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


[GitHub] spark issue #22208: [SPARK-25216][SQL] Improve error message when a column c...

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

    https://github.com/apache/spark/pull/22208
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #22208: [SPARK-25216][SQL] Improve error message when a column c...

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

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


---

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


[GitHub] spark issue #22208: [SPARK-25216][SQL] Improve error message when a column c...

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

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


---

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


[GitHub] spark issue #22208: [SPARK-25216][SQL] Improve error message when a column c...

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

    https://github.com/apache/spark/pull/22208
  
    **[Test build #97728 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/97728/testReport)** for PR 22208 at commit [`2b00e92`](https://github.com/apache/spark/commit/2b00e92a575f99247a752d1f84883ec4f3fefdaf).


---

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


[GitHub] spark issue #22208: [SPARK-25216][SQL] Improve error message when a column c...

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

    https://github.com/apache/spark/pull/22208
  
    **[Test build #97716 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/97716/testReport)** for PR 22208 at commit [`2b00e92`](https://github.com/apache/spark/commit/2b00e92a575f99247a752d1f84883ec4f3fefdaf).


---

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


[GitHub] spark issue #22208: [SPARK-25216][SQL] Improve error message when a column c...

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

    https://github.com/apache/spark/pull/22208
  
    **[Test build #97783 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/97783/testReport)** for PR 22208 at commit [`2b00e92`](https://github.com/apache/spark/commit/2b00e92a575f99247a752d1f84883ec4f3fefdaf).


---

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


[GitHub] spark issue #22208: [SPARK-25216][SQL] Improve error message when a column c...

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

    https://github.com/apache/spark/pull/22208
  
    Build finished. Test PASSed.


---

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


[GitHub] spark pull request #22208: [SPARK-25216][SQL] Improve error message when a c...

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

    https://github.com/apache/spark/pull/22208#discussion_r212785096
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala ---
    @@ -216,8 +216,16 @@ class Dataset[T] private[sql](
       private[sql] def resolve(colName: String): NamedExpression = {
         queryExecution.analyzed.resolveQuoted(colName, sparkSession.sessionState.analyzer.resolver)
           .getOrElse {
    -        throw new AnalysisException(
    -          s"""Cannot resolve column name "$colName" among (${schema.fieldNames.mkString(", ")})""")
    +        if (schema.fieldNames.contains(colName)) {
    --- End diff --
    
    @icexelloss . This cannot handle mixed cases like the following. This should be handled for the purpose of this PR. Please use `sparkSession.sessionState.analyzer.resolver`.
    ```python
    spark.range(0, 1).toDF('A.b')['a.B']
    ```


---

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


[GitHub] spark issue #22208: [SPARK-25216][SQL] Improve error message when a column c...

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

    https://github.com/apache/spark/pull/22208
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #22208: [SPARK-25216][SQL] Improve error message when a column c...

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

    https://github.com/apache/spark/pull/22208
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/4193/
    Test PASSed.


---

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


[GitHub] spark issue #22208: [SPARK-25216][SQL] Improve error message when a column c...

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

    https://github.com/apache/spark/pull/22208
  
    Build finished. Test PASSed.


---

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


[GitHub] spark issue #22208: [SPARK-25216][SQL] Improve error message when a column c...

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

    https://github.com/apache/spark/pull/22208
  
    **[Test build #97716 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/97716/testReport)** for PR 22208 at commit [`2b00e92`](https://github.com/apache/spark/commit/2b00e92a575f99247a752d1f84883ec4f3fefdaf).
     * This patch **fails due to an unknown error code, -9**.
     * This patch **does not merge cleanly**.
     * This patch adds no public classes.


---

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


[GitHub] spark issue #22208: [SPARK-25216][SQL] Improve error message when a column c...

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

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


---

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


[GitHub] spark issue #22208: [SPARK-25216][SQL] Improve error message when a column c...

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

    https://github.com/apache/spark/pull/22208
  
    @dongjoon-hyun SGTM. I misunderstood your suggestion about resolver. Keeping it simple was my preference too.


---

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


[GitHub] spark issue #22208: [SPARK-25216][SQL] Improve error message when a column c...

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

    https://github.com/apache/spark/pull/22208
  
    Could you add some unit tests for this? At least, we had better check the error message for both `spark.sql.caseSensitive=true` and `spark.sql.caseSensitive=false`.


---

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


[GitHub] spark issue #22208: [SPARK-25216][SQL] Improve error message when a column c...

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

    https://github.com/apache/spark/pull/22208
  
    Build finished. Test PASSed.


---

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


[GitHub] spark issue #22208: [SPARK-25216][SQL] Improve error message when a column c...

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

    https://github.com/apache/spark/pull/22208
  
    **[Test build #95301 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/95301/testReport)** for PR 22208 at commit [`01f9cd5`](https://github.com/apache/spark/commit/01f9cd5c0450ce35f7e91ebe7328cdee3e911441).
     * This patch **fails Spark unit tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

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


[GitHub] spark issue #22208: [SPARK-25216][SQL] Improve error message when a column c...

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

    https://github.com/apache/spark/pull/22208
  
    @dongjoon-hyun Could please take another look? I changed to use resolver and try to resolve column with backticks and added unit tests as well.


---

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


[GitHub] spark issue #22208: [SPARK-25216][SQL] Improve error message when a column c...

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

    https://github.com/apache/spark/pull/22208
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #22208: [SPARK-25216][SQL] Improve error message when a column c...

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

    https://github.com/apache/spark/pull/22208
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/4228/
    Test PASSed.


---

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


[GitHub] spark issue #22208: [SPARK-25216][SQL] Improve error message when a column c...

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

    https://github.com/apache/spark/pull/22208
  
    Build finished. Test PASSed.


---

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


[GitHub] spark pull request #22208: [SPARK-25216][SQL] Improve error message when a c...

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

    https://github.com/apache/spark/pull/22208#discussion_r212784956
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala ---
    @@ -216,8 +216,16 @@ class Dataset[T] private[sql](
       private[sql] def resolve(colName: String): NamedExpression = {
         queryExecution.analyzed.resolveQuoted(colName, sparkSession.sessionState.analyzer.resolver)
           .getOrElse {
    -        throw new AnalysisException(
    -          s"""Cannot resolve column name "$colName" among (${schema.fieldNames.mkString(", ")})""")
    +        if (schema.fieldNames.contains(colName)) {
    +          throw new AnalysisException(
    +            s"""Cannot resolve column name "$colName" among (${schema.fieldNames.mkString(", ")}).
    +               | Try adding backticks to the column name, i.e., `$colName`"""
    +              .stripMargin.replaceAll("\n", ""))
    +        } else {
    +          throw new AnalysisException(
    +            s"""Cannot resolve column name "$colName" among (${schema.fieldNames.mkString(", ")}"""
    --- End diff --
    
    At the end of message, `)` is missing.


---

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


[GitHub] spark issue #22208: [SPARK-25216][SQL] Improve error message when a column c...

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

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


---

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


[GitHub] spark issue #22208: [SPARK-25216][SQL] Improve error message when a column c...

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

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


---

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


[GitHub] spark issue #22208: [SPARK-25216][SQL] Improve error message when a column c...

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

    https://github.com/apache/spark/pull/22208
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #22208: [SPARK-25216][SQL] Improve error message when a column c...

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

    https://github.com/apache/spark/pull/22208
  
    **[Test build #95427 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/95427/testReport)** for PR 22208 at commit [`a8a5976`](https://github.com/apache/spark/commit/a8a59760228d4fac54175caeffdfe07faf26a184).


---

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


[GitHub] spark issue #22208: [SPARK-25216][SQL] Improve error message when a column c...

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

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


---

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


[GitHub] spark issue #22208: [SPARK-25216][SQL] Improve error message when a column c...

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

    https://github.com/apache/spark/pull/22208
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #22208: [SPARK-25216][SQL] Improve error message when a column c...

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

    https://github.com/apache/spark/pull/22208
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/2580/
    Test PASSed.


---

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


[GitHub] spark issue #22208: [SPARK-25216][SQL] Improve error message when a column c...

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

    https://github.com/apache/spark/pull/22208
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/2678/
    Test PASSed.


---

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


[GitHub] spark pull request #22208: [SPARK-25216][SQL] Improve error message when a c...

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

    https://github.com/apache/spark/pull/22208#discussion_r212708600
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala ---
    @@ -216,8 +216,16 @@ class Dataset[T] private[sql](
       private[sql] def resolve(colName: String): NamedExpression = {
         queryExecution.analyzed.resolveQuoted(colName, sparkSession.sessionState.analyzer.resolver)
           .getOrElse {
    -        throw new AnalysisException(
    -          s"""Cannot resolve column name "$colName" among (${schema.fieldNames.mkString(", ")})""")
    +        if (schema.fieldNames.contains(colName)) {
    +          throw new AnalysisException(
    +            s"""Cannot resolve column name "$colName" among (${schema.fieldNames.mkString(", ")}).
    +               | Try adding backticks to the column name, i.e., `$colName`"""
    --- End diff --
    
    Ah, I mean if the name parts of the column `a.b.c` should be considered as the name of whole column itself like `` `a.b.c` ``


---

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


[GitHub] spark issue #22208: [SPARK-25216][SQL] Improve error message when a column c...

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

    https://github.com/apache/spark/pull/22208
  
    **[Test build #95439 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/95439/testReport)** for PR 22208 at commit [`2b00e92`](https://github.com/apache/spark/commit/2b00e92a575f99247a752d1f84883ec4f3fefdaf).


---

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


[GitHub] spark issue #22208: [SPARK-25216][SQL] Improve error message when a column c...

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

    https://github.com/apache/spark/pull/22208
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #22208: [SPARK-25216][SQL] Improve error message when a column c...

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

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


---

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


[GitHub] spark issue #22208: [SPARK-25216][SQL] Improve error message when a column c...

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

    https://github.com/apache/spark/pull/22208
  
    Build finished. Test FAILed.


---

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


[GitHub] spark issue #22208: [SPARK-25216][SQL] Improve error message when a column c...

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

    https://github.com/apache/spark/pull/22208
  
    **[Test build #97728 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/97728/testReport)** for PR 22208 at commit [`2b00e92`](https://github.com/apache/spark/commit/2b00e92a575f99247a752d1f84883ec4f3fefdaf).
     * This patch **fails due to an unknown error code, -9**.
     * This patch **does not merge cleanly**.
     * This patch adds no public classes.


---

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


[GitHub] spark issue #22208: [SPARK-25216][SQL] Improve error message when a column c...

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

    https://github.com/apache/spark/pull/22208
  
    **[Test build #95178 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/95178/testReport)** for PR 22208 at commit [`21a3732`](https://github.com/apache/spark/commit/21a3732104f311785946a0808dbc132f0e7a892e).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

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


[GitHub] spark issue #22208: [SPARK-25216][SQL] Improve error message when a column c...

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

    https://github.com/apache/spark/pull/22208
  
    **[Test build #95178 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/95178/testReport)** for PR 22208 at commit [`21a3732`](https://github.com/apache/spark/commit/21a3732104f311785946a0808dbc132f0e7a892e).


---

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


[GitHub] spark issue #22208: [SPARK-25216][SQL] Improve error message when a column c...

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

    https://github.com/apache/spark/pull/22208
  
    Build finished. Test FAILed.


---

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