Yikun commented on code in PR #36353:
URL: https://github.com/apache/spark/pull/36353#discussion_r883205995


##########
python/pyspark/pandas/frame.py:
##########
@@ -490,20 +491,30 @@ def _internal(self) -> InternalFrame:
         return cast(InternalFrame, self._internal_frame)  # type: 
ignore[has-type]
 
     def _update_internal_frame(
-        self, internal: InternalFrame, requires_same_anchor: bool = True
+        self,
+        internal: InternalFrame,
+        requires_same_anchor: bool = True,
+        force_disconnect: bool = False,
     ) -> None:
         """
         Update InternalFrame with the given one.
 
-        If the column_label is changed or the new InternalFrame is not the 
same `anchor`,
-        disconnect the link to the Series and create a new one.
+        If the column_label is changed or the new InternalFrame is not the 
same `anchor` or the
+        `force_disconnect` flag is set to True, disconnect the link to the 
Series and create a new
+        one.
 
         If `requires_same_anchor` is `False`, checking whether or not the same 
anchor is ignored
         and force to update the InternalFrame, e.g., replacing the internal 
with the resolved_copy,
         updating the underlying Spark DataFrame which need to combine a 
different Spark DataFrame.
 
-        :param internal: the new InternalFrame
-        :param requires_same_anchor: whether checking the same anchor
+        Parameters
+        ----------
+        internal : InternalFrame
+            The new InternalFrame
+        requires_same_anchor : bool
+            Whether checking the same anchor
+        force_disconnect : bool
+            Force to disconnect the link to Series and create new one

Review Comment:
   ```suggestion
           anchor_force_disconnect : bool
               Force to disconnect the original anchor and update with a new 
creating dataframe
   ```
   
   How about? : )



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