uros-b commented on code in PR #56726:
URL: https://github.com/apache/spark/pull/56726#discussion_r3466615792


##########
python/pyspark/sql/column.py:
##########
@@ -1150,6 +1150,41 @@ def name(self, *alias: str, **kwargs: Any) -> "Column":
         """
         ...
 
+    @property
+    def _name(self) -> str:
+        """
+        Returns the column's name, alias, or expression as a string, in the 
same
+        form shown by the column's :func:`repr`.
+
+        This is handy for reusing or inspecting a column's name, for example to
+        re-alias an expression with the source column's name, or to branch on 
the
+        name inside a helper function. The leading underscore avoids a 
collision
+        with the existing :func:`name` method (an alias for :func:`alias`).
+
+        .. versionadded:: 5.0.0

Review Comment:
   ```suggestion
           .. versionadded:: 4.3.0
   ```



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