itholic commented on a change in pull request #34389:
URL: https://github.com/apache/spark/pull/34389#discussion_r737069062



##########
File path: python/pyspark/pandas/base.py
##########
@@ -439,6 +440,7 @@ def __rxor__(self, other: Any) -> SeriesOrIndex:
         return self._dtype_op.rxor(self, other)
 
     def __len__(self) -> int:
+        log_advice("`len` is expensive. Be aware of use it unless it is 
absolutely necessary.")

Review comment:
       Yeah, actually many APIs are using `len` in its implementation.
   
   I think we can just remove this one.

##########
File path: python/pyspark/pandas/base.py
##########
@@ -439,6 +440,7 @@ def __rxor__(self, other: Any) -> SeriesOrIndex:
         return self._dtype_op.rxor(self, other)
 
     def __len__(self) -> int:
+        log_advice("`len` is expensive. Be aware of use it unless it is 
absolutely necessary.")

Review comment:
       Yeah, actually many APIs are using `len` in its implementation codes.
   
   I think we can just remove this one.




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