> ## Documentation Index
> Fetch the complete documentation index at: https://docs.firebolt.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Hash functions

> Spark hash functions supported in SparkSQL and Databricks compatibility modes.

Preview

Spark [hash functions](https://spark.apache.org/docs/latest/sql-ref-functions-builtin.html#hash-functions) in [SparkSQL and Databricks compatibility modes](https://docs.firebolt.io/reference-sql/spark/overview.md). Both modes share these functions. Support is one of: Supported, With limitations, or Not supported. Supported means every example in the Spark reference returns what Spark returns; a note under With limitations quotes a call that differs.

| Function | Support | Notes |
| :- | :- | :- |
| [`MD5`](https://spark.apache.org/docs/4.1.0/api/sql/#md5) | Supported | |
| [`HASH`](https://spark.apache.org/docs/4.1.0/api/sql/#hash) | With limitations | `hash('Spark', array(123), 2)` returns `8281311729385991842`, where Spark returns `-1321691492`. |
| `CRC32`, `SHA`, `SHA1`, `SHA2`, `XXHASH64` | Not supported | |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.