title: How to convert RDD of Avro's GenericData.Record to DataFrame?
body: <p>Perhaps this question may seem a bit abstract, here it is:</p>
  
  <pre><code>val originalAvroSchema : Schema   = // read from a file
  val rdd : RDD[GenericData.Record] = // From some streaming source
  
  // Looking for a handy:
  val df: DataFrame   = rdd.toDF(schema)
  </code></pre>
  
  <p>I explore <a href="https://github.com/databricks/spark-avro"><code>spark-avro</code></a> but it has support only to read from a file, not from existing <code>RDD</code>.</p>