grundprinzip commented on code in PR #46789:
URL: https://github.com/apache/spark/pull/46789#discussion_r1640215498


##########
python/pyspark/sql/connect/expressions.py:
##########
@@ -162,7 +172,7 @@ def __init__(self, parent: Expression, alias: 
Sequence[str], metadata: Any):
 
     def to_plan(self, session: "SparkConnectClient") -> "proto.Expression":
         if len(self._alias) == 1:
-            exp = proto.Expression()
+            exp = proto.Expression(origin=self.origin)

Review Comment:
   We should fix this repetitive code in a similar way we've done for relations 
by creating a common create method that avoids having to know how to initialize 
the common attributes of the class.



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