title: Using map on dataset with arbitrary rows in Spark SQL
body: <p>I'm trying to use the Dataframe map function on an arbitrary dataset. However I don't understand how you would map from Row-> Row. No examples are given for arbitrary data in the spark sql documentation:</p>
  
  <pre><code>Dataset&lt;Row&gt; original_data = ...
  Dataset&lt;Row&gt; changed_data = original_data.map(new MapFunction&lt;Row,Row&gt;{
              @Override
              public Row call(Row row) throws Exception {
                  Row newRow = RowFactory.create(obj1,obj2);
                  return newRow;
              }
  }, Encoders.bean(Row.class));
  </code></pre>
  
  <p>However this does not work since there needs to be some sort of Encoder?
  How can I map to a generic Row?</p>