xinrong-databricks commented on code in PR #36353:
URL: https://github.com/apache/spark/pull/36353#discussion_r883193494


##########
python/pyspark/pandas/frame.py:
##########
@@ -5495,7 +5506,15 @@ def op(psser: ps.Series) -> ps.Series:
 
         inplace = validate_bool_kwarg(inplace, "inplace")
         if inplace:
-            self._update_internal_frame(psdf._internal, 
requires_same_anchor=False)
+            # Since Pandas 1.4, df.fillna generates a new dataframe instead of 
operating
+            # in-place. See also SPARK-38946. Currently, `bfill` and `ffill` 
still keep
+            # inplace operate behaviors.
+            force_disconnect = (method is None) and 
LooseVersion(pd.__version__) >= LooseVersion(

Review Comment:
   Is keeping version checks in unit tests, but no version checks in main codes 
a good idea?



-- 
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-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to