title: Spark throws : "expression is neither present in the group by, nor is it an aggregate function..."
body: <p>I'm trying to execute this with pyspark:</p>
  
  <pre><code>query = "SELECT       *\
           FROM         transaction\
           INNER JOIN   factures\
           ON           transaction.t_num = factures.f_trx\
           WHERE        transaction.t_num != ''\
           GROUP BY     transaction.t_num"
  
  result = sqlContext.sql(query)
  </code></pre>
  
  <p>Spark gives an error :</p>
  
  <blockquote>
    <p>u"expression <code>transaction.t_aut</code> is neither present in the group by, nor is it an aggregate function. Add to group by or wrap in first() (or first_value) if you don't care which value you get.;</p>
  </blockquote>