Skip to content
Prev Previous commit
Next Next commit
fix pyspark test faiure
  • Loading branch information
kiszk committed Jun 8, 2018
commit 2fcbb805801ebe94616e5c3ae2e4f76cd73e5f02
2 changes: 1 addition & 1 deletion python/pyspark/sql/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -1829,7 +1829,7 @@ def create_map_from_arrays(col1, col2):

>>> df = spark.createDataFrame([([2, 5], ["Alice", "Bob"])], ['k', 'v'])
>>> df.select(create_map_from_arrays(df.k, df.v).alias("map")).collect()
[Row(map={5: u'Bob', 2: u'Alice'})]
[Row(map={2: u'Alice', 5: u'Bob'})]
"""
sc = SparkContext._active_spark_context
return Column(sc._jvm.functions.map_from_arrays(_to_java_column(col1), _to_java_column(col2)))
Expand Down