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


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

Review Comment:
   Yep, good suggestion, but `required_same_anchor` is orignal parameter, and 
already being used in current code.
   
   Consider it's internal function, we could change it. I can submit a separate 
PR to address it to make PR easy to review.



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