> For the complete documentation index, see [llms.txt](https://mariadb.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mariadb.com/docs/gridgain/gridgain-9/gridgain9-management/migration-guides/migration-from-gridgain-8/sql-function-comparison.md).

# SQL Function Comparison

How SQL functions and data types map from GridGain 8 to the Calcite-based GridGain 9 engine: renamed, removed, and directly equivalent functions.

As GridGain 9 uses the Calcite engine, a number of functions have changed. The majority of functions can be migrated without additional actions, however for some functions additional actions are required.

## Changed Functions

The following functions have been changed in GridGain 9. They can be used with minor changes.

| GridGain 8     | GridGain 9        | Comment                                                          |
| -------------- | ----------------- | ---------------------------------------------------------------- |
| DAY\_OF\_MONTH | DAYOFMONTH        | This function was renamed.                                       |
| DAY\_OF\_WEEK  | DAYOFWEEK         | This function was renamed.                                       |
| DAY\_OF\_YEAR  | DAYOFYEAR         | This function was renamed.                                       |
| IS\_JSON value | IS JSON \[VALUE]  | Function syntax was changed, the behavior is unchanged.          |
| ISNULL         | NVL               | This function was renamed.                                       |
| INSTR(a, b)    | POSITION (b IN a) | Function name and syntax was changed, the behavior is unchanged. |
| RANDOM\_UUID   | RAND\_UUID        | This function was renamed.                                       |

## Changed Data Types

| GridGain 8 | GridGain 9 | Comment                                       |
| ---------- | ---------- | --------------------------------------------- |
| BOOLEAN    | BOOLEAN    | Only `true` and `false` values are supported. |

## Removed Functions

The following functions were removed in GridGain 9. Follow the recommendations below to adapt your code.

| GridGain 8     | Comment                                                             |
| -------------- | ------------------------------------------------------------------- |
| BITAND         | No equivalent is currently available.                               |
| BITGET         | No equivalent is currently available.                               |
| BITOR          | No equivalent is currently available.                               |
| BITXOR         | No equivalent is currently available.                               |
| BIT\_AND       | No equivalent is currently available.                               |
| BIT\_OR        | No equivalent is currently available.                               |
| COMPRESS       | No equivalent is currently available.                               |
| CONVERT        | No equivalent is currently available.                               |
| CURRENT\_TIME  | No equivalent is currently available.                               |
| DECRYPT        | No equivalent is currently available.                               |
| ENCRYPT        | No equivalent is currently available.                               |
| EXPAND         | No equivalent is currently available.                               |
| FIRSTVALUE     | No equivalent is currently available.                               |
| FORMATDATETIME | Use `CAST (datetimeval AS VARCHAR FORMAT 'format-string')` instead. |
| GROUP\_CONCAT  | No equivalent is currently available.                               |
| JSON\_MODIFY   | No equivalent is currently available.                               |
| LASTVALUE      | No equivalent is currently available.                               |
| LOG            | No equivalent is currently available.                               |
| PARSEDATETIME  | Use `CAST (string AS datetime-type FORMAT 'format-string')`         |
| ROUNDMAGIC     | No equivalent is currently available.                               |
| SECURE\_RAND   | No equivalent is currently available.                               |
| STDDEV\_POP    | No equivalent is currently available.                               |
| STDDEV\_SAMP   | No equivalent is currently available.                               |
| VAR\_POP       | No equivalent is currently available.                               |
| VAR\_SAMP      | No equivalent is currently available.                               |
| ZERO           | No equivalent is currently available.                               |

## Functions With Direct Equivalent

The following functions have direct equivalent in GridGain 9 and no actions are required to migrate them.

* ABS
* ACOS
* ASCII
* ASIN
* ATAN
* ATAN2
* AVG
* CAST
* CBRT
* CEIL
* CEILING
* CHAR\_LENGTH
* CHR
* COALESCE
* CONCAT
* COS
* COSH
* COT
* COUNT
* CURRENT\_DATE
* DATEDIFF
* DAYNAME
* DECODE
* DEGREES
* DIFFERENCE
* EXP
* EXTRACT
* FLOOR
* FROM\_BASE64
* GREATEST
* HOUR
* INITCAP
* JSON\_ARRAY
* JSON\_OBJECT
* JSON\_QUERY
* JSON\_VALUE
* LEFT
* LENGTH
* LN
* LOG10
* LOWER
* LTRIM
* MAX
* MD5
* MIN
* MINUTE
* MOD
* MONTH
* MONTHNAME
* NVL
* OCTET\_LENGTH
* PI
* POSITION
* POWER
* QUARTER
* RADIANS
* RAND
* REPEAT
* REPLACE
* REVERSE
* RIGHT
* ROUND
* RTRIM
* SECOND
* SHA1
* SIGN
* SIN
* SINH
* SOUNDEX
* SPACE
* SQRT
* SUBSTR
* SUBSTRING
* SUM
* TAN
* TANH
* TIMESTAMPADD
* TIMESTAMPDIFF
* TO\_BASE64
* TRANSLATE
* TRIM
* TRUNCATE
* UPPER
* WEEK
* YEAR
