amaliujia commented on code in PR #37994:
URL: https://github.com/apache/spark/pull/37994#discussion_r988621244


##########
connector/connect/src/main/scala/org/apache/spark/sql/connect/planner/SparkConnectPlanner.scala:
##########
@@ -111,8 +122,12 @@ class SparkConnectPlanner(plan: proto.Relation, session: 
SparkSession) {
     }
   }
 
-  private def transformUnresolvedExpression(exp: proto.Expression): 
UnresolvedAttribute = {
-    UnresolvedAttribute(exp.getUnresolvedAttribute.getPartsList.asScala.toSeq)
+  private def transformUnresolvedExpression(exp: proto.Expression): Expression 
= {
+    if (exp.getUnresolvedAttribute.getPartsCount == 1) {
+      Literal.create(exp.getUnresolvedAttribute.getParts(0), StringType)

Review Comment:
   I need to change this is to match catalyst DSL. 
   
   catalyst DSL generates a string literal for `a` in `relation.select("a")`. 
   
   If we think catalyst DSL is the standard way to generate logical plan then 
we should also follow it in connect. 



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to