title: alternative to collect in spark sq for getting list o map of values
body: <p>Basically is very general my question, everybody tell dont use collect in spark, mainly when you want a huge dataframe, becasue you can get an error in dirver by memory, but in a lot cases the only one way of getting data from a dataframe to a List o Map in "Real mode" is with collect, this is contradictory and I would like to know which alternatives we have in spark.</p>
  
  <p>Thanks in advance.</p>