Github user gatorsmile commented on the pull request:

    https://github.com/apache/spark/pull/11415#issuecomment-189781029
  
    So far, if we use backticks, analyzer is unable to process it. When we 
parse the plan, we did not remove the backticks. In `CatalystQl`, we clean the 
backticks for all the attribute/alias names if users use it. 
    
    Before the PR fix, we do not clean backticks. The name of 
`attributeReference` is \`thing1\`. When analyzing the node `Project`, Analyzer 
is unable to find it (i.e., `thing1`) from the child's output, in which the 
column name is \`thing1\` instead of `thing1`, and thus, report the following 
error:
    ```
    cannot resolve '`thing1`' given input columns: [`thing1`, thing2]; line 3 
pos 7
    ```
    
    The error message is pretty confusing. This message is issued from 
    ```scala
                a.failAnalysis(s"cannot resolve '${a.sql}' given input columns: 
[$from]")
    ```
    The backstick in the first  '\`thing1\`' is added by the function call 
`a.sql`. The backstick in the second  '\`thing1\`' is part of the name. Thus, 
they look the same, but they are different in our plan. 



---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to