You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/03/18 14:15:42 UTC

[GitHub] [spark] cloud-fan commented on a change in pull request #31854: [SPARK-34763][SQL] col(), $"" and df("name") should handle quoted column names properly

cloud-fan commented on a change in pull request #31854:
URL: https://github.com/apache/spark/pull/31854#discussion_r596911804



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/unresolved.scala
##########
@@ -206,8 +206,13 @@ object UnresolvedAttribute {
       val char = name(i)
       if (inBacktick) {
         if (char == '`') {
-          inBacktick = false
-          if (i + 1 < name.length && name(i + 1) != '.') throw e
+          if (i + 1 < name.length && name(i + 1) == '`') {

Review comment:
       maybe we should get rid of this hand-written parser and simply call `CatalystSqlParser.parseMultipartIdentifier` here.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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