Github user kanzhang commented on a diff in the pull request:
https://github.com/apache/spark/pull/448#discussion_r12023704
--- Diff: sql/core/src/main/scala/org/apache/spark/sql/SchemaRDD.scala ---
@@ -313,4 +315,82 @@ class SchemaRDD(
}
}
}
+
+ /**
+ * Creates SchemaRDD by applying own schema to derived RDD. Typically
used to wrap return value
+ * of base RDD functions that do not change schema.
+ *
+ * @param rdd RDD derived from this one and has same schema
+ *
+ * @group schema
+ */
+ private def applySchema(rdd: RDD[Row]): SchemaRDD = {
+ new SchemaRDD(sqlContext,
SparkLogicalPlan(ExistingRdd(logicalPlan.output, rdd)))
+ }
+
+ //
=======================================================================
+ // Base RDD functions that do NOT change schema
+ //
=======================================================================
+
+ // Common RDD functions
+
+ override def cache(): SchemaRDD = {
--- End diff --
Thanks for pointing it out, will verify this.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---