Skip to content

Commit

Permalink
rename scala map
Browse files Browse the repository at this point in the history
  • Loading branch information
adrian-wang committed May 12, 2015
1 parent af0268a commit 9e232e7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ private[spark] object PythonUtils {
/**
* Convert java map of K, V into Map of K, V (for calling API with varargs)
*/
def toMap[K, V](jm: java.util.Map[K, V]): Map[K, V] = {
def toScalaMap[K, V](jm: java.util.Map[K, V]): Map[K, V] = {
jm.toMap
}
}
8 changes: 4 additions & 4 deletions python/pyspark/sql/dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -579,8 +579,8 @@ def _jseq(self, cols, converter=None):
return _to_seq(self.sql_ctx._sc, cols, converter)

def _jmap(self, jm):
"""Return a JVM Map from a dict"""
return _to_map(self.sql_ctx._sc, jm)
"""Return a JVM Scala Map from a dict"""
return _to_scala_map(self.sql_ctx._sc, jm)

def _jcols(self, *cols):
"""Return a JVM Seq of Columns from a list of Column or column names
Expand Down Expand Up @@ -1300,11 +1300,11 @@ def _to_seq(sc, cols, converter=None):
return sc._jvm.PythonUtils.toSeq(cols)


def _to_map(sc, jm):
def _to_scala_map(sc, jm):
"""
Convert a dict into a JVM Map.
"""
return sc._jvm.PythonUtils.toMap(jm)
return sc._jvm.PythonUtils.toScalaMap(jm)


def _unary_op(name, doc="unary operator"):
Expand Down

0 comments on commit 9e232e7

Please sign in to comment.