Skip to content
Snippets Groups Projects
Commit a17384fa authored by Reynold Xin's avatar Reynold Xin
Browse files

[SPARK-9907] [SQL] Python crc32 is mistakenly calling md5

Author: Reynold Xin <rxin@databricks.com>

Closes #8138 from rxin/SPARK-9907.
parent 6f60298b
No related branches found
No related tags found
No related merge requests found
......@@ -885,10 +885,10 @@ def crc32(col):
returns the value as a bigint.
>>> sqlContext.createDataFrame([('ABC',)], ['a']).select(crc32('a').alias('crc32')).collect()
[Row(crc32=u'902fbdd2b1df0c4f70b4a5d23525e932')]
[Row(crc32=2743272264)]
"""
sc = SparkContext._active_spark_context
return Column(sc._jvm.functions.md5(_to_java_column(col)))
return Column(sc._jvm.functions.crc32(_to_java_column(col)))
@ignore_unicode_prefix
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment