I guess you’re talking about the JDBC adapter, and generating SQL for other dialects.
I don’t recall why we have stripCastFromString() but I know that it was introduced for a good reason. Try making it no-op and see which tests fail. Julian > On Aug 23, 2019, at 3:32 AM, Soma Mondal <[email protected]> wrote: > > Hello, > > We have a REL which has this information > select * from employee where employee_id = cast('12' as float); > > but Calcite removes the CAST from the STRING literal('12' in our case). > select * from employee where employee_id = '12'; > > There are dialects which needs explicit casting in the above case and we > need to maintain the CAST in our dialect. > Calcite removes the cast in SqlImplementor's stripCastFromString() method. I > would like to understand why Calcite removes the CAST and shall we go ahead > and make the changes in Calcite to maintain the CAST. > > Thanks & Regards, > Soma Mondal
