itholic commented on code in PR #40525:
URL: https://github.com/apache/spark/pull/40525#discussion_r1159192785
##########
python/pyspark/sql/connect/dataframe.py:
##########
@@ -1628,11 +1629,29 @@ def checkpoint(self, *args: Any, **kwargs: Any) -> None:
def localCheckpoint(self, *args: Any, **kwargs: Any) -> None:
raise NotImplementedError("localCheckpoint() is not implemented.")
- def to_pandas_on_spark(self, *args: Any, **kwargs: Any) -> None:
- raise NotImplementedError("to_pandas_on_spark() is not implemented.")
-
- def pandas_api(self, *args: Any, **kwargs: Any) -> None:
- raise NotImplementedError("pandas_api() is not implemented.")
+ def to_pandas_on_spark(
+ self, index_col: Optional[Union[str, List[str]]] = None
+ ) -> "PandasOnSparkDataFrame":
+ warnings.warn(
+ "DataFrame.to_pandas_on_spark is deprecated. Use
DataFrame.pandas_api instead.",
+ FutureWarning,
+ )
+ return self.pandas_api(index_col)
+
+ def pandas_api(
Review Comment:
Nice catch. Will address the comments.
##########
python/pyspark/sql/connect/dataframe.py:
##########
@@ -1628,11 +1629,29 @@ def checkpoint(self, *args: Any, **kwargs: Any) -> None:
def localCheckpoint(self, *args: Any, **kwargs: Any) -> None:
raise NotImplementedError("localCheckpoint() is not implemented.")
- def to_pandas_on_spark(self, *args: Any, **kwargs: Any) -> None:
- raise NotImplementedError("to_pandas_on_spark() is not implemented.")
-
- def pandas_api(self, *args: Any, **kwargs: Any) -> None:
- raise NotImplementedError("pandas_api() is not implemented.")
+ def to_pandas_on_spark(
+ self, index_col: Optional[Union[str, List[str]]] = None
+ ) -> "PandasOnSparkDataFrame":
+ warnings.warn(
+ "DataFrame.to_pandas_on_spark is deprecated. Use
DataFrame.pandas_api instead.",
+ FutureWarning,
+ )
+ return self.pandas_api(index_col)
+
+ def pandas_api(
Review Comment:
Nice catch. Will address the comment
--
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]