pyspark.sql.functions.xxhash64

pyspark.sql.functions.xxhash64(*cols: ColumnOrName) → pyspark.sql.column.Column

Calculates the hash code of given columns using the 64-bit variant of the xxHash algorithm, and returns the result as a long column.

Examples

>>> spark.createDataFrame([('ABC',)], ['a']).select(xxhash64('a').alias('hash')).collect()
[Row(hash=4105715581806190027)]