title: Pyspark says "Row' object has no attribute '_get_object_id' on partitionBy()
body: <p>Consider the following SchemaRDD:</p>
  
  <pre><code>schemaRdd = hiveContext.sql(myQuery)
  </code></pre>
  
  <p>I am unable to use <strong>partitionBy</strong> on it, having tried the following:</p>
  
  <pre><code>numParts = 10
  schemaRdd.partitionBy(numParts)
  
  schemaRdd.keyBy(lambda row: row[0]).partitionBy(numParts)
  </code></pre>
  
  <p>Both give the "Row' object has no attribute '_get_object_id' error. </p>
  
  <p>How can we then partition the SchemaRdd with 
  - selected #partitions
  - specific partitioner - I want to also provide second parameter that is a partitioner after the _get_object_id issue is resolved</p>