implement parsing of CAST(), automatically parse dates inside literals