You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/11/10 06:47:04 UTC

[GitHub] [spark] HyukjinKwon commented on a diff in pull request #38546: [SPARK-41036][CONNECT][PYTHON] `columns` API should use `schema` API to avoid data fetching

HyukjinKwon commented on code in PR #38546:
URL: https://github.com/apache/spark/pull/38546#discussion_r1018707212


##########
python/pyspark/sql/connect/dataframe.py:
##########
@@ -139,11 +139,9 @@ def columns(self) -> List[str]:
         if self._plan is None:
             return []
         if "columns" not in self._cache and self._plan is not None:
-            pdd = self.limit(0).toPandas()

Review Comment:
   Hmmm .. why do we need `_cache`? I think we can just remove.



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

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


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