> ## 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.

# Miscellaneous functions

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

Preview

Spark [miscellaneous functions](https://spark.apache.org/docs/latest/sql-ref-functions-builtin.html#misc-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 |
| :- | :- | :- |
| [`UUID`](https://spark.apache.org/docs/4.1.0/api/sql/#uuid) | Supported | |
| [`CURRENT_CATALOG`](https://spark.apache.org/docs/4.1.0/api/sql/#current_catalog) | With limitations | Returns the current Firebolt database, where Spark returns `spark_catalog`. |
| [`CURRENT_DATABASE`](https://spark.apache.org/docs/4.1.0/api/sql/#current_database) | With limitations | Returns the current Firebolt database, where Spark returns the current schema. |
| [`CURRENT_SCHEMA`](https://spark.apache.org/docs/4.1.0/api/sql/#current_schema) | With limitations | Returns the current Firebolt schema, `public` unless set otherwise. |
| [`CURRENT_USER`](https://spark.apache.org/docs/4.1.0/api/sql/#current_user) | With limitations | Returns the Firebolt user name. |
| [`SESSION_USER`](https://spark.apache.org/docs/4.1.0/api/sql/#session_user) | With limitations | Returns the Firebolt user name. |
| [`TYPEOF`](https://spark.apache.org/docs/4.1.0/api/sql/#typeof) | With limitations | `typeof(1)` returns `'integer'`, where Spark returns `'int'`. |
| [`USER`](https://spark.apache.org/docs/4.1.0/api/sql/#user) | With limitations | Returns the Firebolt user name. |
| [`VERSION`](https://spark.apache.org/docs/4.1.0/api/sql/#version) | With limitations | Returns Firebolt's version string. |
| `AES_DECRYPT`, `AES_ENCRYPT`, `APPROX_TOP_K_ESTIMATE`, `ASSERT_TRUE`, `BITMAP_BIT_POSITION`, `BITMAP_BUCKET_NUMBER`, `BITMAP_COUNT`, `FROM_AVRO`, `FROM_PROTOBUF`, `HLL_SKETCH_ESTIMATE`, `HLL_UNION`, `INPUT_FILE_BLOCK_LENGTH`, `INPUT_FILE_BLOCK_START`, `INPUT_FILE_NAME`, `JAVA_METHOD`, `KLL_SKETCH_GET_N_BIGINT`, `KLL_SKETCH_GET_N_DOUBLE`, `KLL_SKETCH_GET_N_FLOAT`, `KLL_SKETCH_GET_QUANTILE_BIGINT`, `KLL_SKETCH_GET_QUANTILE_DOUBLE`, `KLL_SKETCH_GET_QUANTILE_FLOAT`, `KLL_SKETCH_GET_RANK_BIGINT`, `KLL_SKETCH_GET_RANK_DOUBLE`, `KLL_SKETCH_GET_RANK_FLOAT`, `KLL_SKETCH_MERGE_BIGINT`, `KLL_SKETCH_MERGE_DOUBLE`, `KLL_SKETCH_MERGE_FLOAT`, `KLL_SKETCH_TO_STRING_BIGINT`, `KLL_SKETCH_TO_STRING_DOUBLE`, `KLL_SKETCH_TO_STRING_FLOAT`, `MONOTONICALLY_INCREASING_ID`, `RAISE_ERROR`, `REFLECT`, `SCHEMA_OF_AVRO`, `SPARK_PARTITION_ID`, `THETA_DIFFERENCE`, `THETA_INTERSECTION`, `THETA_SKETCH_ESTIMATE`, `THETA_UNION`, `TO_AVRO`, `TO_PROTOBUF`, `TRY_AES_DECRYPT`, `TRY_REFLECT` | Not supported | |


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