title: sparkSQL Map column in group by clause
body: <p>I am migrating a query from Hive to SparkSQL, but, running into one issue with Map column.</p>
  
  <p>My query is</p>
  
  <pre><code>spark.sql(select col1,col2,my_map,count(*) from table group by col1,col2,my_map)
  </code></pre>
  
  <p>The error I get is </p>
  
  <pre><code>`my_map` cannot be used as a grouping expression because its data type map&lt;string,string&gt; is not an orderable data type.;
  </code></pre>
  
  <p>The keys in my_map always vary. I tried using deprecated HiveContext, but, that didn't help. Is there any workaround for this?</p>
  
  <p>Thanks!</p>