diff --git a/python/pyspark/rdd.py b/python/pyspark/rdd.py index 76ea4db846e82..93787e309c921 100644 --- a/python/pyspark/rdd.py +++ b/python/pyspark/rdd.py @@ -1394,6 +1394,7 @@ def __init__(self, pyRDD): self.ctx = pyRDD.ctx self.sql_ctx = self.ctx._jvm.JavaSQLContext(self.ctx._jsc) self._jrdd = self.ctx._pythonToJava(pyRDD._jrdd) + self._srdd = self.sql_ctx.applySchema(self._jrdd) def _test():