calcite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Soma Mondal <mail.mondal.s...@gmail.com>
Subject Preserving CAST of STRING operands in comparison operator
Date Fri, 23 Aug 2019 10:32:17 GMT
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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message