Github user rgbkrk commented on a diff in the pull request:
https://github.com/apache/spark/pull/21654#discussion_r216381942
--- Diff: python/pyspark/sql/dataframe.py ---
@@ -375,6 +375,9 @@ def _truncate(self):
return int(self.sql_ctx.getConf(
"spark.sql.repl.eagerEval.truncate", "20"))
+ def __len__(self):
--- End diff --
This is roughly the same line of thinking I'd have. I don't know how
expensive it is to allow `count` to be able to be called within iterators, etc.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]