Repository: incubator-systemml
Updated Branches:
  refs/heads/master a1f1cf5a1 -> 338633784


[SYSTEMML-668] Python MLOutput.getDF() Can't Access JVM SQLContext

In PySpark, access to the JVM SQLContext from a PySpark SQLContext instance has 
always been officially exposed via `sqlContext._ssql_ctx`.  However, we have 
been using an unofficial variable, `sqlContext._scala_SQLContext`, which has 
been renamed in 2.0, breaking any previous code using the former construct, 
such as our Python `MLOutput.getDF(...)` method.  Therefore, we just need to 
update our PySpark API to use the official access point.

Closes #140.


Project: http://git-wip-us.apache.org/repos/asf/incubator-systemml/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-systemml/commit/33863378
Tree: http://git-wip-us.apache.org/repos/asf/incubator-systemml/tree/33863378
Diff: http://git-wip-us.apache.org/repos/asf/incubator-systemml/diff/33863378

Branch: refs/heads/master
Commit: 338633784e0bea0b6acc2122b51e50f20491892a
Parents: a1f1cf5
Author: Mike Dusenberry <[email protected]>
Authored: Mon May 9 15:23:30 2016 -0700
Committer: Mike Dusenberry <[email protected]>
Committed: Mon May 9 15:23:30 2016 -0700

----------------------------------------------------------------------
 src/main/java/org/apache/sysml/api/python/SystemML.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/33863378/src/main/java/org/apache/sysml/api/python/SystemML.py
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/api/python/SystemML.py 
b/src/main/java/org/apache/sysml/api/python/SystemML.py
index 7b834c5..e5d94af 100644
--- a/src/main/java/org/apache/sysml/api/python/SystemML.py
+++ b/src/main/java/org/apache/sysml/api/python/SystemML.py
@@ -226,7 +226,7 @@ class MLOutput(object):
 
     def getDF(self, sqlContext, varName):
         try:
-            jdf = self.jmlOut.getDF(sqlContext._scala_SQLContext, varName)
+            jdf = self.jmlOut.getDF(sqlContext._ssql_ctx, varName)
             df = DataFrame(jdf, sqlContext)
             return df
         except Py4JJavaError:

Reply via email to