Skip to content

Commit 9e232e7

Browse files
committed
rename scala map
1 parent af0268a commit 9e232e7

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

core/src/main/scala/org/apache/spark/api/python/PythonUtils.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ private[spark] object PythonUtils {
5757
/**
5858
* Convert java map of K, V into Map of K, V (for calling API with varargs)
5959
*/
60-
def toMap[K, V](jm: java.util.Map[K, V]): Map[K, V] = {
60+
def toScalaMap[K, V](jm: java.util.Map[K, V]): Map[K, V] = {
6161
jm.toMap
6262
}
6363
}

python/pyspark/sql/dataframe.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -579,8 +579,8 @@ def _jseq(self, cols, converter=None):
579579
return _to_seq(self.sql_ctx._sc, cols, converter)
580580

581581
def _jmap(self, jm):
582-
"""Return a JVM Map from a dict"""
583-
return _to_map(self.sql_ctx._sc, jm)
582+
"""Return a JVM Scala Map from a dict"""
583+
return _to_scala_map(self.sql_ctx._sc, jm)
584584

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

13021302

1303-
def _to_map(sc, jm):
1303+
def _to_scala_map(sc, jm):
13041304
"""
13051305
Convert a dict into a JVM Map.
13061306
"""
1307-
return sc._jvm.PythonUtils.toMap(jm)
1307+
return sc._jvm.PythonUtils.toScalaMap(jm)
13081308

13091309

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

0 commit comments

Comments
 (0)