diff --git a/python/pyspark/sql/connect/dataframe.py b/python/pyspark/sql/connect/dataframe.py index 47c06ca2f7a7f..339e364d1f802 100644 --- a/python/pyspark/sql/connect/dataframe.py +++ b/python/pyspark/sql/connect/dataframe.py @@ -1776,8 +1776,8 @@ def _to_table(self) -> Tuple["pa.Table", Optional[StructType]]: return (table, schema) def _toArrow(self) -> "pa.Table": - query = self._plan.to_proto(self._session.client) - return self._session.client.to_table(query, self._plan.observations) + table = self._to_table()[0] + return table _toArrow.__doc__ = PySparkDataFrame._toArrow.__doc__