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


##########
connector/connect/src/main/scala/org/apache/spark/sql/connect/planner/SparkConnectPlanner.scala:
##########
@@ -242,6 +243,17 @@ class SparkConnectPlanner(session: SparkSession) {
       .logicalPlan
   }
 
+  private def transformWithColumns(rel: proto.WithColumns): LogicalPlan = {
+    val (names, cols) =
+      rel.getNameExprListList.asScala
+        .map(e => (e.getName(0), Column(transformExpression(e.getExpr))))

Review Comment:
   I really want to not validation more on server side. Partially because I 
feel like that is not good user experience (partially of the partially is 
because how we throw exceptions in client side).
   
   If we ever can eliminate ambiguity (thus lead to a good API design) then why 
not, which can be achieved by have two proto message, one is for single alias 
and another is for multiple alias.
   
   Even we include a `bool` to indicate if this is a singe alias or multi alias 
is better than server side validation.  



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