title: Spark 2.0 GROUP BY NULLS
body: <p>Working on migrating some queries from Spark 1.5 to Spark 2.0</p>
  
  <p>The query is the following:</p>
  
  <pre><code>SELECT 
      users.age AS users_age,
  
    NULL
  
   AS users_running_total_on_null
  FROM users
  
  GROUP BY users.age
  ORDER BY users_age 
  LIMIT 1
  </code></pre>
  
  <p>First of all, I know in Spark, null checks don't work when used in a group by, and calling <code>LENGTH()</code> on the value and null checking works correctly.</p>
  
  <p>Running the above query, I get the following error:</p>
  
  <p><code>
  SQL Error: java.lang.IllegalArgumentException: Unrecognized type name: null\"
  </code></p>
  
  <p>Any ideas what the problem is?</p>