WL#14015: Allow YEAR as type in the CAST function

Affects: Server-8.0   —   Status: Complete

MySQL does not allow CASTing to YEAR type. It is required for completeness of the type system and will be handled by this WL.

By allowing the YEAR argument to the CAST function, it will be possible for arguments of any data type (except GEOMETRY) to be correctly converted to the YEAR data type.

RAPID engine does not allow queries which have comparisons between arguments of different data types. This will make it possible for users to explicitly CAST arguments to YEAR in comparisons in order to be offloaded to RAPID.

A follow up WL will make the implicit CASTs, that MySQL internally does at the moment, explicit, so that RAPID will behave the same as MySQL.