title: How to get an Iterator of Rows using Dataframe in SparkSQL
body: <p>I have an application in SparkSQL which returns large number of rows that are very difficult to fit in memory so I will not be able to use collect function on DataFrame, is there a way using which I can get all this rows as an Iterable instaed of the entire rows as list.</p>
  <p>I am executing this SparkSQL application using yarn-client.</p>