aboutsummaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorWenchen Fan <wenchen@databricks.com>2016-01-13 12:29:02 -0800
committerReynold Xin <rxin@databricks.com>2016-01-13 12:29:02 -0800
commitc2ea79f96acd076351b48162644ed1cff4c8e090 (patch)
tree55ca22bdd84dac3cb225cd2b9bddaf0c11c93d19 /python
parente4e0b3f7b2945aae5ec7c3d68296010bbc5160cf (diff)
downloadspark-c2ea79f96acd076351b48162644ed1cff4c8e090.tar.gz
spark-c2ea79f96acd076351b48162644ed1cff4c8e090.tar.bz2
spark-c2ea79f96acd076351b48162644ed1cff4c8e090.zip
[SPARK-12642][SQL] improve the hash expression to be decoupled from unsafe row
https://issues.apache.org/jira/browse/SPARK-12642 Author: Wenchen Fan <wenchen@databricks.com> Closes #10694 from cloud-fan/hash-expr.
Diffstat (limited to 'python')
-rw-r--r--python/pyspark/sql/functions.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/python/pyspark/sql/functions.py b/python/pyspark/sql/functions.py
index b0390cb994..719eca8f55 100644
--- a/python/pyspark/sql/functions.py
+++ b/python/pyspark/sql/functions.py
@@ -1023,7 +1023,7 @@ def hash(*cols):
"""Calculates the hash code of given columns, and returns the result as a int column.
>>> sqlContext.createDataFrame([('ABC',)], ['a']).select(hash('a').alias('hash')).collect()
- [Row(hash=1358996357)]
+ [Row(hash=-757602832)]
"""
sc = SparkContext._active_spark_context
jc = sc._jvm.functions.hash(_to_seq(sc, cols, _to_java_column))