We added the double-colon syntax to our own fork of the Calcite grammar to placate our analysts and their addiction to Redshift. TBH it was not easy, and our implementation still doesn't support things like casting from a scalar subquery. Essentially, you can cast identifiers and function results. But I'm sure the folks around here could figure it out.
> On Sep 27, 2016, at 11:11 AM, Jacques Nadeau <[email protected]> wrote: > > Hey Everybody, > > I'd like to propose adding the double colon cast syntax to Calcite (e.g. > '1'::INTEGER instead of CAST('1' as INTEGER). It's something that Postgres, > DB2, Vertica (PG deriv), RedShift (PG deriv) and a number of other systems > support. Has anybody explored this or previously opened a jira (I searched > and didn't find any)? Any thoughts on lexical ambiguities? > > thanks, > Jacques
