Syntax:
CAST(expr AS type [ARRAY])

The CAST() function takes an expression of any type and produces a
result value of the specified type, similar to CONVERT(). For more
information, see the description of CONVERT().

In MySQL 8.0.17 and later, InnoDB allows the use of an additional ARRAY
keyword for creating a multi-valued index on a JSON array as part of
CREATE INDEX, CREATE TABLE, and ALTER TABLE statements. ARRAY is not
supported except when used to create a multi-valued index in one of
these statements, in which case it is required. The column being
indexed must be a column of type JSON. (CONVERT() does not support
multi-valued index creation or the ARRAY keyword.) The type following
the AS keyword may be any of the types supported by CAST(), with the
exception of BINARY and JSON, which are not supported for this purpose.
https://dev.mysql.com/doc/refman/8.0/en/create-index.html#create-index-
multi-valued, provides syntax information and examples, as well as
other relevant information.

CAST() is standard SQL syntax.

URL: https://dev.mysql.com/doc/refman/8.0/en/cast-functions.html

