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/07 00:07:43 UTC

[GitHub] [spark] huaxingao commented on a change in pull request #31754: [SPARK-25769][SPARK-34636][SPARK-34626][SQL] sql method in UnresolvedAttribute, AttributeReference and Alias don't quote qualified names properly.

huaxingao commented on a change in pull request #31754:
URL: https://github.com/apache/spark/pull/31754#discussion_r588948790



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/unresolved.scala
##########
@@ -141,8 +140,7 @@ case class UnresolvedTableValuedFunction(
  */
 case class UnresolvedAttribute(nameParts: Seq[String]) extends Attribute with Unevaluable {
 
-  def name: String =
-    nameParts.map(n => if (n.contains(".")) s"`$n`" else n).mkString(".")
+  def name: String = nameParts.map(n => if (n.contains(".")) s"`$n`" else n).mkString(".")

Review comment:
       I have a question here: 
    For```UnresolvedAttribute("`a.b`"::"c.d"::Nil).sql```, shall we return
    ```
   `a.b`.`c.d`
   ``` 
   instead of
   ```
   ```a.b```.`c.d`
   ```
   




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