[
https://issues.apache.org/jira/browse/CALCITE-3318?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16954453#comment-16954453
]
Danny Chen edited comment on CALCITE-3318 at 10/18/19 11:04 AM:
----------------------------------------------------------------
Fixed in
[cd24cae|https://github.com/apache/calcite/commit/cd24cae77072e56e4333d10114bf380be79709f1],
thanks for your PR, [~Soma.Mondal] !
was (Author: danny0405):
Fixed in
[a39cab3|https://github.com/apache/calcite/commit/a39cab31bf202645743138b8f632607e1776a3a1],
thanks for your PR, [~Soma.Mondal] !
> Preserving CAST of VARCHAR operand in binary comparison for BigQuery
> --------------------------------------------------------------------
>
> Key: CALCITE-3318
> URL: https://issues.apache.org/jira/browse/CALCITE-3318
> Project: Calcite
> Issue Type: Bug
> Components: core
> Affects Versions: 1.20.0
> Reporter: Soma Mondal
> Assignee: Danny Chen
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.22.0
>
> Time Spent: 5h 40m
> Remaining Estimate: 0h
>
> 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'm thinking of having the dialect intercept this and decide whether or not
> to remove the cast.
>
> I have created a PR [https://github.com/apache/calcite/pull/1437]
--
This message was sent by Atlassian Jira
(v8.3.4#803005)