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 2022/11/11 03:14:34 UTC

[GitHub] [spark] HyukjinKwon commented on a diff in pull request #38607: [SPARK-40938][CONNECT][PYTHON][FOLLOW-UP] Fix SubqueryAlias without the child plan when constructing Connect proto in the Python client

HyukjinKwon commented on code in PR #38607:
URL: https://github.com/apache/spark/pull/38607#discussion_r1019793828


##########
python/pyspark/sql/connect/plan.py:
##########
@@ -712,6 +712,8 @@ def __init__(self, child: Optional["LogicalPlan"], alias: str) -> None:
 
     def plan(self, session: "RemoteSparkSession") -> proto.Relation:
         rel = proto.Relation()
+        if self._child is not None:
+            rel.subquery_alias.input.CopyFrom(self._child.plan(session))

Review Comment:
   Can we have an e2e test with `DataFrame.alias` since we're here?



##########
python/pyspark/sql/connect/plan.py:
##########
@@ -712,6 +712,8 @@ def __init__(self, child: Optional["LogicalPlan"], alias: str) -> None:
 
     def plan(self, session: "RemoteSparkSession") -> proto.Relation:
         rel = proto.Relation()
+        if self._child is not None:
+            rel.subquery_alias.input.CopyFrom(self._child.plan(session))

Review Comment:
   Can we have an e2e test with `DataFrame.alias` while we're 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.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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